Intersoft ClientUI Documentation
DocumentConverter Property
See Also  Send Feedback
Intersoft.Client.UI.DocumentViewers Namespace > FlowDocumentViewerBase Class : DocumentConverter Property






Gets or sets the converter used when opening a file.

Gets or sets the converter used when opening a file.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property DocumentConverter As IValueConverter
Visual Basic (Usage)Copy Code
Dim instance As FlowDocumentViewerBase
Dim value As IValueConverter
 
instance.DocumentConverter = value
 
value = instance.DocumentConverter
C# 
[CategoryAttribute("Common Properties")]
public IValueConverter DocumentConverter {get; set;}
Delphi 
public read-write property DocumentConverter: IValueConverter; 
JScript 
CategoryAttribute("Common Properties")
public function get,set DocumentConverter : IValueConverter
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property IValueConverter* get_DocumentConverter();
public: __property void set_DocumentConverter( 
   IValueConverter* value
);
C++/CLI 
[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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.