Class BinaryDataProviderBase
Represents a wrapper of IDocumentFormatProvider allowing the latter to be used in data binding scenarios.
Inheritance
Namespace: Telerik.Windows.Documents.FormatProviders
Assembly: Telerik.Windows.Documents.dll
Syntax
public class BinaryDataProviderBase : FrameworkElement
Constructors
BinaryDataProviderBase(IDocumentFormatProvider, DependencyObject, DependencyProperty)
Initializes a new instance of the BinaryDataProviderBase class.
Declaration
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyObject propertyOwner, DependencyProperty bytesProperty)
Parameters
IDocumentFormatProvider
formatProvider
The format provider. |
System.Windows.DependencyObject
propertyOwner
The property owner. |
System.Windows.DependencyProperty
bytesProperty
The bytes property. |
BinaryDataProviderBase(IDocumentFormatProvider, DependencyProperty)
Initializes a new instance of the BinaryDataProviderBase class.
Declaration
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyProperty bytesProperty)
Parameters
IDocumentFormatProvider
formatProvider
The format provider. |
System.Windows.DependencyProperty
bytesProperty
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
System.Windows.DependencyProperty
|
RichTextBoxProperty
The rich text box property.
Declaration
public static readonly DependencyProperty RichTextBoxProperty
Field Value
System.Windows.DependencyProperty
|
UpdateSourceTriggerProperty
The update source trigger property.
Declaration
public static readonly DependencyProperty UpdateSourceTriggerProperty
Field Value
System.Windows.DependencyProperty
|
Properties
Bytes
Gets or sets the bytes.
Declaration
protected IList<byte> Bytes { get; set; }
Property Value
System.Collections.Generic.IList<System.Byte>
The bytes. |
FormatProvider
Gets or sets the IDocumentFormatProvider thas is used when converting the document
Declaration
public IDocumentFormatProvider FormatProvider { get; set; }
Property Value
IDocumentFormatProvider
|
RichTextBox
Gets or sets the RadRichTextBox this DataProvider is attached to.
Declaration
public RadRichTextBox RichTextBox { get; set; }
Property Value
RadRichTextBox
|
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
radRichTextBox
The RadRichTextBox. |
BytesPropertyChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)
The callback invoked when the Bytes property changes.
Declaration
protected static void BytesPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)
Parameters
System.Windows.DependencyObject
sender
The sender. |
System.Windows.DependencyPropertyChangedEventArgs
e
The System.Windows.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
System.String
name
The name. |
Returns
System.Windows.DependencyProperty
|
OnBytesChanged()
Called after the byte[] associated with this instance changes.
Declaration
protected virtual void OnBytesChanged()
OnImportException(DataProviderImportExceptionEventArgs)
Raises the ImportException event.
Declaration
protected virtual void OnImportException(DataProviderImportExceptionEventArgs args)
Parameters
DataProviderImportExceptionEventArgs
args
The DataProviderImportExceptionEventArgs instance containing the event data. |
OnSetupDocument(RadDocument)
Called when the DataProvider creates new document.
Declaration
protected virtual void OnSetupDocument(RadDocument document)
Parameters
RadDocument
document
The new document. |
SetValueRespectingOneWayBindings(IList<Byte>)
Sets the value respecting one way bindings.
Declaration
protected void SetValueRespectingOneWayBindings(IList<byte> value)
Parameters
System.Collections.Generic.IList<System.Byte>
value
The value. |
Unbind(RadRichTextBox)
Unbinds the specified RadRichTextBox.
Declaration
protected virtual void Unbind(RadRichTextBox radRichTextBox)
Parameters
RadRichTextBox
radRichTextBox
The RRadRichTextBox. |
UpdateBytes()
Updates the bytes.
Declaration
public virtual void UpdateBytes()
UpdateDocument()
Updates the document.
Declaration
public virtual void UpdateDocument()
Events
BytesChanged
Occurs after the byte[] associated with this instance changes.
Declaration
protected event EventHandler BytesChanged
Event Type
System.EventHandler
|
ImportException
Occurs when an exception is thrown during import.
Declaration
public event EventHandler<DataProviderImportExceptionEventArgs> ImportException
Event Type
System.EventHandler<DataProviderImportExceptionEventArgs>
|
SetupDocument
Fires when the DataProvider creates new document.
Declaration
public event EventHandler<SetupDocumentEventArgs> SetupDocument
Event Type
System.EventHandler<SetupDocumentEventArgs>
|