Figures in a FlowDocument : FlowDocument « Windows Presentation Foundation « C# / CSharp Tutorial

Home
C# / CSharp Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statement
5.String
6.struct
7.Class
8.Operator Overload
9.delegate
10.Attribute
11.Data Structure
12.Assembly
13.Date Time
14.Development
15.File Directory Stream
16.Preprocessing Directives
17.Regular Expression
18.Generic
19.Reflection
20.Thread
21.I18N Internationalization
22.LINQ
23.GUI Windows Forms
24.Windows Presentation Foundation
25.Windows Communication Foundation
26.Workflow
27.2D
28.Design Patterns
29.Windows
30.XML
31.XML LINQ
32.ADO.Net
33.Network
34.Directory Services
35.Security
36.unsafe
C# / C Sharp
C# / C Sharp by API
C# / CSharp Open Source
C# / CSharp Tutorial » Windows Presentation Foundation » FlowDocument 
24.156.11.Figures in a FlowDocument
<Window x:Class="Documents.Figures"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="FloatersAndFigures" Height="478" Width="740">
  <Window.Resources>
    <Style x:Key="myStyle">
      <Setter Property="Paragraph.FontSize" Value="30" ></Setter>
      <Setter Property="Paragraph.FontStyle" Value="Italic" ></Setter>
      <Setter Property="Paragraph.Foreground" Value="Green" ></Setter>
      <Setter Property="Paragraph.Padding" Value="5"></Setter>
      <Setter Property="Paragraph.Margin" Value="5,10,15,10"></Setter>
    </Style>
  </Window.Resources>
  <FlowDocumentScrollViewer Name="docViewer" MinZoom="1" MaxZoom="1000" IsToolBarVisible ="True">
    <FlowDocument IsOptimalParagraphEnabled="True" IsHyphenationEnabled="True" >
      <Paragraph>
        text
        <Figure Width="100" Padding="5,0,5,0" HorizontalAnchor="PageRight">
          <BlockUIContainer>
            <Image Source="c:\image.jpg" ></Image>
          </BlockUIContainer>
        </Figure>
        text
      </Paragraph>
      <Paragraph>
        The hallway smelt of boiled cabbage and old rag mats.<Run xml:space="preserve"> </Run>
        <Floater Style="{StaticResource myStyle}" Width="205" HorizontalAlignment="Left">
          <Paragraph>this is a test</Paragraph>
        </Floater>
        text
      </Paragraph>
    </FlowDocument>
  </FlowDocumentScrollViewer>

</Window>
WPF Figures In A Flow Document
24.156.FlowDocument
24.156.1.FlowDocument with SectionFlowDocument with Section
24.156.2.FlowDocument with UI containerFlowDocument with UI container
24.156.3.FlowDocument with TableFlowDocument with Table
24.156.4.Span and FlowDoucmentSpan and FlowDoucment
24.156.5.FlowDocument with Figure.xamlFlowDocument with Figure.xaml
24.156.6.Paragraph FontWeightParagraph FontWeight
24.156.7.FlowDocument with Hyperlink and ListFlowDocument with Hyperlink and List
24.156.8.Adding style to ParagraphAdding style to Paragraph
24.156.9.Bold text in Flow documentBold text in Flow document
24.156.10.Create Table layout in FlowDocumentCreate Table layout in FlowDocument
24.156.11.Figures in a FlowDocumentFigures in a FlowDocument
24.156.12.Styled DocumentStyled Document
24.156.13.Add ListItem to FlowDocumentAdd ListItem to FlowDocument
24.156.14.FlowDocument with TextAlignment, ColumnWidth. Italic and bold fontFlowDocument with TextAlignment, ColumnWidth. Italic and bold font
24.156.15.Flow Document ReaderFlow Document Reader
24.156.16.Add FlowDocument to ButtonAdd FlowDocument to Button
24.156.17.FlowDocument with imagesFlowDocument with images
24.156.18.Add Shape(Ellipse, Rectangle) to ListAdd Shape(Ellipse, Rectangle) to List
24.156.19.Change FlowDocument Width and HeightChange FlowDocument Width and Height
24.156.20.Programmatically change the FlowDirection of content within a FlowDocumentReader elementProgrammatically change the FlowDirection of content within a FlowDocumentReader element
24.156.21.Use FlowDocumentReader to display FlowDocumentUse FlowDocumentReader to display FlowDocument
24.156.22.Programmatically Create and Save a FlowDocumentProgrammatically Create and Save a FlowDocument
24.156.23.Use XamlDesignerSerializationManager to write FlowDocumentUse XamlDesignerSerializationManager to write FlowDocument
24.156.24.Show FlowDocumentShow FlowDocument
24.156.25.Load a FlowDocument into a FlowDocumentReader,Load a FlowDocument into a FlowDocumentReader,
24.156.26.Convert Xaml file to FlowDocument with as operatorConvert Xaml file to FlowDocument with as operator
24.156.27.Save a FlowDocument as a Extensible Application Markup Language (XAML) fileSave a FlowDocument as a Extensible Application Markup Language (XAML) file
24.156.28.Clear FlowDocumentReaderClear FlowDocumentReader
24.156.29.Programmatically add rows to a Table element.Programmatically add rows to a Table element.
24.156.30.Table Flow ContentTable Flow Content
24.156.31.Annotation ServiceAnnotation Service
24.156.32.Toggle Hyphenation, Optimal Paragraph, and Column FlexToggle Hyphenation, Optimal Paragraph, and Column Flex
24.156.33.Change font Change font
24.156.34.Document StylesDocument Styles
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.