Represents a wrapper of IDocumentFormatProvider allowing the latter to be used in data binding scenarios.
Definition
Namespace:Telerik.Windows.Documents.FormatProviders
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class BinaryDataProviderBase : FrameworkElement
Inheritance: objectBinaryDataProviderBase
Derived Classes:
Constructors
Initializes a new instance of the BinaryDataProviderBase class.
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyObject propertyOwner, DependencyProperty bytesProperty)
The format provider.
propertyOwnerDependencyObjectThe property owner.
bytesPropertyDependencyPropertyThe bytes property.
Initializes a new instance of the BinaryDataProviderBase class.
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyProperty bytesProperty)
The format provider.
bytesPropertyDependencyPropertyThe bytes property.
Fields
FormatProviderProperty
DependencyProperty
The format provider property. It gets or sets the associated format provider.
public static readonly DependencyProperty FormatProviderProperty
RichTextBoxProperty
DependencyProperty
The rich text box property.
public static readonly DependencyProperty RichTextBoxProperty
UpdateSourceTriggerProperty
DependencyProperty
The update source trigger property.
public static readonly DependencyProperty UpdateSourceTriggerProperty
Properties
Gets or sets the bytes.
protected IList<byte> Bytes { get; set; }
The bytes.
Gets or sets the IDocumentFormatProvider thas is used when converting the document
public IDocumentFormatProvider FormatProvider { get; set; }
Gets or sets the RadRichTextBox this DataProvider is attached to.
public RadRichTextBox RichTextBox { get; set; }
Gets or sets the update source trigger.
public DataProviderUpdateSourceTrigger UpdateSourceTrigger { get; set; }
The update source trigger.
Methods
Binds the specified RadRichTextBox.
protected virtual void Bind(RadRichTextBox radRichTextBox)
The RadRichTextBox.
The callback invoked when the Bytes property changes.
protected static void BytesPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)
The sender.
eDependencyPropertyChangedEventArgsThe DependencyPropertyChangedEventArgs instance containing the event data.
Called after the byte[] associated with this instance changes.
protected virtual void OnBytesChanged()
Raises the event.
protected virtual void OnImportException(DataProviderImportExceptionEventArgs args)
The DataProviderImportExceptionEventArgs instance containing the event data.
Called when the DataProvider creates new document.
protected virtual void OnSetupDocument(RadDocument document)
The new document.
Unbinds the specified RadRichTextBox.
protected virtual void Unbind(RadRichTextBox radRichTextBox)
The RRadRichTextBox.
Updates the bytes.
public virtual void UpdateBytes()
Updates the document.
public virtual void UpdateDocument()
Events
Occurs after the byte[] associated with this instance changes.
protected event EventHandler BytesChanged
Occurs when an exception is thrown during import.
public event EventHandler<DataProviderImportExceptionEventArgs> ImportException
Fires when the DataProvider creates new document.
public event EventHandler<SetupDocumentEventArgs> SetupDocument