Class ExportSettings
Represents the customization settings for exporting document.
Inheritance
Namespace: Syncfusion.UI.Xaml.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.UWP.dll
Syntax
public class ExportSettings : DependencyObject
Constructors
ExportSettings()
Declaration
public ExportSettings()
Fields
OptimizeRtfFileSizeProperty
Identifies the OptimizeRtfFileSize dependency property.
Declaration
public static readonly DependencyProperty OptimizeRtfFileSizeProperty
Field Value
| Type | Description |
|---|---|
| Windows.UI.Xaml.DependencyProperty | The identifier for the OptimizeRtfFileSize dependency property. |
Properties
OptimizeRtfFileSize
Gets or sets a value indicating whether to reduce the resultant RTF file size by removing the tags with default values. The default value is false.
Declaration
public bool OptimizeRtfFileSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true to reduce the resultant RTF file size, like WordPad application, RichTextBox control; otherwise, false |
Examples
The following code example demonstrates how to set the OptimizeRtfFileSize property.
<!-- Sets the OptimizeRtfFileSize. -->
<RichTextBoxAdv:SfRichTextBoxAdv.ExportSettings>
<RichTextBoxAdv:ExportSettings OptimizeRtfFileSize="True"/>
</RichTextBoxAdv:SfRichTextBoxAdv.ExportSettings>
// Sets the OptimizeRtfFileSize.
SfRichTextBoxAdv richTextBoxAdv = new SfRichTextBoxAdv();
richTextBoxAdv.ExportSettings.OptimizeRtfFileSize = true;
' Sets the OptimizeRtfFileSize.
Dim richTextBoxAdv As New SfRichTextBoxAdv()
richTextBoxAdv.ExportSettings.OptimizeRtfFileSize = True
Methods
add_UIContainerExporting(ExportSettings.UIContainerExportingEventHandler)
Declaration
public void add_UIContainerExporting(ExportSettings.UIContainerExportingEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| ExportSettings.UIContainerExportingEventHandler | value |
remove_UIContainerExporting(ExportSettings.UIContainerExportingEventHandler)
Declaration
public void remove_UIContainerExporting(ExportSettings.UIContainerExportingEventHandler value)
Parameters
| Type | Name | Description |
|---|---|---|
| ExportSettings.UIContainerExportingEventHandler | value |
Events
UIContainerExporting
Occurs when UIContainer is exporting in SfRichTextBoxAdv control.
Declaration
public event ExportSettings.UIContainerExportingEventHandler UIContainerExporting
Event Type
| Type |
|---|
| ExportSettings.UIContainerExportingEventHandler |
Remarks
This event will be triggered when an UIContainer is exported in document.
Examples
The following code example demonstrates how to skip the specific UIContainers with button in document exporting
<RichTextBoxAdv:SfRichTextBoxAdv x:Name="richTextBoxAdv" LayoutType="Pages">
<RichTextBoxAdv:SfRichTextBoxAdv.ExportSettings>
<!-- Defines export settings -->
<RichTextBoxAdv:ExportSettings UIContainerExporting="ExportSettings_UIContainerExporting" />
</RichTextBoxAdv:SfRichTextBoxAdv.ExportSettings>
</RichTextBoxAdv:SfRichTextBoxAdv>
private void ExportSettings_UIContainerExporting(object obj, UIContainerExportingEventArgs args)
{
// Skips the button controls specifically on exporting in Docx, Dox, Rtf or HTML formats.
if (args.UIContainer != null && args.UIContainer.UIElement is Button)
{
//It will skip the exploring of UIContainer.
args.ExportType = UIContainerExportType.None;
}
}
Private Sub ExportSettings_UIContainerExporting(sender As Object, args As UIContainerExportingEventArgs)
' Skips the button controls specifically on exporting in Docx, Dox, Rtf or HTML formats.
If(TypeOf ((Not (args.UIContainer) Is Nothing) _
AndAlso args.UIContainer.UIElement) Is Button) Then
' It will skip the exporing of UIContainer.
args.ExportType = UIContainerExportType.None
End If
End Sub