Intersoft ClientUI Documentation
DocumentConverter Property



Gets or sets the converter used when opening a file.

Syntax
<CategoryAttribute("Common Properties")>
Public Property DocumentConverter As IValueConverter
Dim instance As FlowDocumentViewerBase
Dim value As IValueConverter
 
instance.DocumentConverter = value
 
value = instance.DocumentConverter
[CategoryAttribute("Common Properties")]
public IValueConverter DocumentConverter {get; set;}
[CategoryAttribute("Common Properties")]
public:
property IValueConverter^ DocumentConverter {
   IValueConverter^ get();
   void set (    IValueConverter^ value);
}
Remarks

There are a number of ways to load a FlowDocument in a viewer. You can set the Source property of the control to the URI of the document, or set the Document property to a FlowDocument object. You can bind the Source property for dynamic loading of a FlowDocument. If you have document that is not FlowDocument format, you can specify a converter using DocumentConverter. For example, you can load HTML file and convert it to FlowDocument format.

XAML
Copy Code
<Intersoft:UXPage 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        xmlns:Intersoft="http://intersoft.clientui.com/schemas"
    xmlns:Converters="clr-namespace:TestProject.Converters"
        x:Class="TestProject.TestFlowDoc" 
        Title="TestFlowDoc Page"
        d:DesignWidth="640" d:DesignHeight="480">

    <Intersoft:UXPage.Resources>
        <Converters:HtmlConverter x:Key="HtmlConverter"/>
    </Intersoft:UXPage.Resources>

    <Grid x:Name="LayoutRoot">
        <Intersoft:UXFlowDocumentViewer Background="White" Source="{Binding SelectedEmail.BodySource}" 
                                              DocumentConverter="{StaticResource HtmlConverter}"/>
    </Grid>
</Intersoft:UXPage>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FlowDocumentViewerBase Class
FlowDocumentViewerBase Members

Send Feedback