Preserve space in FlowDocument : FlowDocument « Windows Presentation Foundation « VB.Net






Preserve space in FlowDocument

Preserve space in FlowDocument
      
<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="FlowDocumentPage" Height="450" Width="500">
    <DockPanel>
        <Button Padding="20" Margin="40">
            <FlowDocumentReader>
                <FlowDocument FontSize="12" xml:space="preserve">
                    <Paragraph TextAlignment="Center" FontSize="18"><Bold>bold</Bold></Paragraph>
                    <Paragraph>Para<Italic>italic</Italic>HTML</Paragraph>
                    <Paragraph>aaa<Button>Push me</Button> 
                    <RadioButton IsChecked="True">Yes</RadioButton>
                    <RadioButton>No</RadioButton>
                    <RadioButton>Unsure</RadioButton>
                    </Paragraph>
                    <Paragraph><Bold>Lists:</Bold></Paragraph>
                    <List>
                        <ListItem><Paragraph>A</Paragraph></ListItem>
                        <ListItem><Paragraph>B</Paragraph></ListItem>
                        <ListItem><Paragraph>C<Ellipse Fill="Red" Width="20" Height="20"/></Paragraph></ListItem>
                        <ListItem><Paragraph>D<Rectangle Fill="Blue" Width="20" Height="20"></Rectangle></Paragraph></ListItem>
                    </List>
                </FlowDocument>
            </FlowDocumentReader>
        </Button>
    </DockPanel>
</Window>

   
    
    
    
    
    
  








Related examples in the same category

1.Add Paragraph to a FlowDocumentAdd Paragraph to a FlowDocument
2.Add Figure into a ParagraphAdd Figure into a Paragraph
3.FlowDocument with a ParagraphFlowDocument with a Paragraph
4.Paragraph elements and FlowDocumentPageViewerParagraph elements and FlowDocumentPageViewer
5.List with ListItems in a FlowDocumentList with ListItems in a FlowDocument
6.Put Paragraph to a ListItemPut Paragraph to a ListItem
7.Table in a FloaterTable in a Floater
8.Set font size for FlowDocumentSet font size for FlowDocument
9.TableCell and TableRow and TableRowGroupTableCell and TableRow and TableRowGroup
10.Put List to FlowDocumentPut List to FlowDocument
11.Use Table to display tabular data.Use Table to display tabular data.
12.Hyperlink Element
13.Paged ContentPaged Content
14.Text JustificationText Justification
15.Add Bold line to ParagraphAdd Bold line to Paragraph
16.A Paragraph inside a FloaterA Paragraph inside a Floater
17.Add Run of text to a ParagraphAdd Run of text to a Paragraph
18.Set HorizontalAnchor, VerticalAnchor, Background for FigureSet HorizontalAnchor, VerticalAnchor, Background for Figure
19.Nested listsNested lists
20.FontWeight of ParagraphFontWeight of Paragraph
21.BlockUIContainer with a Button along with ParagraphBlockUIContainer with a Button along with Paragraph
22.List MarkerStyleList MarkerStyle
23.Explicit table columnsExplicit table columns
24.Specifying figure widths in columns unitsSpecifying figure widths in columns units
25.Programmatically change the FlowDirection of content within a FlowDocumentReader elementProgrammatically change the FlowDirection of content within a FlowDocumentReader element
26.Use FlowDocumentReader to display FlowDocumentUse FlowDocumentReader to display FlowDocument
27.Programmatically Create and Save a FlowDocumentProgrammatically Create and Save a FlowDocument
28.Use XamlDesignerSerializationManager to write FlowDocumentUse XamlDesignerSerializationManager to write FlowDocument
29.Show FlowDocumentShow FlowDocument
30.Table Flow ContentTable Flow Content
31.Change FlowDocument Width and HeightChange FlowDocument Width and Height
32.Clear FlowDocumentReaderClear FlowDocumentReader
33.Programmatically add rows to a Table element.Programmatically add rows to a Table element.
34.Toggle Hyphenation, Optimal Paragraph, and Column FlexToggle Hyphenation, Optimal Paragraph, and Column Flex
35.Use basic typographic properties.Use basic typographic properties.
36.Annotation ServiceAnnotation Service