ClassBinaryDataProviderBase
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
BinaryDataProviderBase(IDocumentFormatProvider, DependencyObject, DependencyProperty)
Initializes a new instance of the BinaryDataProviderBase class.
Declaration
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyObject propertyOwner, DependencyProperty bytesProperty)
Parameters
formatProvider
The format provider.
propertyOwner
DependencyObject
The property owner.
bytesProperty
DependencyProperty
The bytes property.
BinaryDataProviderBase(IDocumentFormatProvider, DependencyProperty)
Initializes a new instance of the BinaryDataProviderBase class.
Declaration
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyProperty bytesProperty)
Parameters
formatProvider
The format provider.
bytesProperty
DependencyProperty
The bytes property.
Fields
FormatProviderProperty
The format provider property. It gets or sets the associated format provider.
Declaration
public static readonly DependencyProperty FormatProviderProperty
Field Value
DependencyProperty
RichTextBoxProperty
The rich text box property.
Declaration
public static readonly DependencyProperty RichTextBoxProperty
Field Value
DependencyProperty
UpdateSourceTriggerProperty
The update source trigger property.
Declaration
public static readonly DependencyProperty UpdateSourceTriggerProperty
Field Value
DependencyProperty
Properties
Bytes
Gets or sets the bytes.
FormatProvider
Gets or sets the IDocumentFormatProvider thas is used when converting the document
Declaration
public IDocumentFormatProvider FormatProvider { get; set; }
Property Value
RichTextBox
Gets or sets the RadRichTextBox this DataProvider is attached to.
Declaration
public RadRichTextBox RichTextBox { get; set; }
Property Value
UpdateSourceTrigger
Gets or sets the update source trigger.
Declaration
public DataProviderUpdateSourceTrigger UpdateSourceTrigger { get; set; }
Property Value
DataProviderUpdateSourceTrigger
The update source trigger.
Methods
Bind(RadRichTextBox)
Binds the specified RadRichTextBox.
Declaration
protected virtual void Bind(RadRichTextBox radRichTextBox)
Parameters
radRichTextBox
The RadRichTextBox.
BytesPropertyChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)
The callback invoked when the Bytes property changes.
Declaration
protected static void BytesPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)
Parameters
sender
DependencyObject
The sender.
e
DependencyPropertyChangedEventArgs
The DependencyPropertyChangedEventArgs instance containing the event data.
CreateBytesProperty(string)
Creates a new property to replace the Bytes property.
Declaration
protected static DependencyProperty CreateBytesProperty(string name)
Parameters
name
The name.
Returns
DependencyProperty
OnBytesChanged()
Called after the byte[] associated with this instance changes.
Declaration
protected virtual void OnBytesChanged()
OnImportException(DataProviderImportExceptionEventArgs)
Raises the event.
Declaration
protected virtual void OnImportException(DataProviderImportExceptionEventArgs args)
Parameters
args
DataProviderImportExceptionEventArgs
The DataProviderImportExceptionEventArgs instance containing the event data.
OnSetupDocument(RadDocument)
Called when the DataProvider creates new document.
Declaration
protected virtual void OnSetupDocument(RadDocument document)
Parameters
document
The new document.
SetValueRespectingOneWayBindings(IList<byte>)
Sets the value respecting one way bindings.
Unbind(RadRichTextBox)
Unbinds the specified RadRichTextBox.
Declaration
protected virtual void Unbind(RadRichTextBox radRichTextBox)
Parameters
radRichTextBox
The RRadRichTextBox.
UpdateDocument()
Updates the document.
Declaration
public virtual void UpdateDocument()
Events
BytesChanged
Occurs after the byte[] associated with this instance changes.
ImportException
Occurs when an exception is thrown during import.
Declaration
public event EventHandler<DataProviderImportExceptionEventArgs> ImportException
Event Value
SetupDocument
Fires when the DataProvider creates new document.
Declaration
public event EventHandler<SetupDocumentEventArgs> SetupDocument
Event Value