XamlFormatProvider
Represents a format provider that can import and export XAML documents from a RadDocument.
Definition
Namespace:Telerik.WinForms.Documents.FormatProviders.Xaml
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class XamlFormatProvider : DocumentFormatProviderBase, IConfigurableXamlFormatProvider, ITextBasedDocumentFormatProvider, IDocumentFormatProvider
Inheritance: objectDocumentFormatProviderBaseXamlFormatProvider
Implements:
Inherited Members
Constructors
Initializes a new instance of the XamlFormatProvider class.
public XamlFormatProvider()
Properties
Gets a value indicating whether this instance can export.
public override bool CanExport { get; }
true if this instance can export; otherwise, false.
Overrides:
Implements:
Gets a value indicating whether this instance can import.
public override bool CanImport { get; }
true if this instance can import; otherwise, false.
Overrides:
Implements:
Gets or sets the settings used while exporting.
public XamlExportSettings ExportSettings { get; set; }
The export settings.
Implements:
Gets or sets the settings used while importing.
public XamlImportSettings ImportSettings { get; set; }
The import settings.
Implements:
Gets the name of the specific format provider.
public override string Name { get; }
The name.
Overrides:
Implements:
SupportedExtensions
IEnumerable<string>
Gets the extensions supported by this format provider.
public override IEnumerable<string> SupportedExtensions { get; }
The supported extensions.
Overrides:
Implements:
Methods
Exports the specified RadDocument instance to XAML.
public override void Export(RadDocument document, Stream output)
The document.
outputStreamThe Stream the document should be saved into.
Overrides:
Implements:
Exports the specified document to a string.
public string Export(RadDocument document)
The document.
Returns:A string containing the document.
Implements:
Imports the specified Stream into a RadDocument instance.
public override RadDocument Import(Stream input)
The Stream containing the XAML document.
Returns:The generated RadDocument instance.
Overrides:
Implements:
Imports the specified XAML string.
public RadDocument Import(string input)
The string containing the XAML document.
Returns:The generated RadDocument instance.
Implements:
Loads a predefined stylesheet.
public static Stylesheet LoadStylesheet(Stream input, XamlImportSettings settings = null)
The stream containing the stylesheet.
settingsXamlImportSettingsThe XAML import settings.
Returns:The loaded object.
Saves a stylesheet.
public static void SaveStylesheet(Stylesheet stylesheet, Stream output)
The stylesheet.
outputStreamThe output stream.