New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class BinaryDataProviderBase : FrameworkElement

Inheritance: objectBinaryDataProviderBase

Derived Classes: DocxDataProvider

Constructors

Initializes a new instance of the BinaryDataProviderBase class.

C#
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyObject propertyOwner, DependencyProperty bytesProperty)
Parameters:formatProviderIDocumentFormatProvider

The format provider.

propertyOwnerDependencyObject

The property owner.

bytesPropertyDependencyProperty

The bytes property.

Initializes a new instance of the BinaryDataProviderBase class.

C#
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyProperty bytesProperty)
Parameters:formatProviderIDocumentFormatProvider

The format provider.

bytesPropertyDependencyProperty

The bytes property.

Fields

FormatProviderProperty

DependencyProperty

The format provider property. It gets or sets the associated format provider.

C#
public static readonly DependencyProperty FormatProviderProperty

RichTextBoxProperty

DependencyProperty

The rich text box property.

C#
public static readonly DependencyProperty RichTextBoxProperty

UpdateSourceTriggerProperty

DependencyProperty

The update source trigger property.

C#
public static readonly DependencyProperty UpdateSourceTriggerProperty

Properties

Gets or sets the bytes.

C#
protected IList<byte> Bytes { get; set; }
Property Value:

The bytes.

Gets or sets the IDocumentFormatProvider thas is used when converting the document

C#
public IDocumentFormatProvider FormatProvider { get; set; }

Gets or sets the RadRichTextBox this DataProvider is attached to.

C#
public RadRichTextBox RichTextBox { get; set; }

Gets or sets the update source trigger.

C#
public DataProviderUpdateSourceTrigger UpdateSourceTrigger { get; set; }
Property Value:

The update source trigger.

Methods

Binds the specified RadRichTextBox.

C#
protected virtual void Bind(RadRichTextBox radRichTextBox)
Parameters:radRichTextBoxRadRichTextBox

The RadRichTextBox.

The callback invoked when the Bytes property changes.

C#
protected static void BytesPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)
Parameters:senderDependencyObject

The sender.

eDependencyPropertyChangedEventArgs

The DependencyPropertyChangedEventArgs instance containing the event data.

Creates a new property to replace the Bytes property.

C#
protected static DependencyProperty CreateBytesProperty(string name)
Parameters:namestring

The name.

Returns:

DependencyProperty

Called after the byte[] associated with this instance changes.

C#
protected virtual void OnBytesChanged()

Raises the event.

C#
protected virtual void OnImportException(DataProviderImportExceptionEventArgs args)
Parameters:argsDataProviderImportExceptionEventArgs

The DataProviderImportExceptionEventArgs instance containing the event data.

Called when the DataProvider creates new document.

C#
protected virtual void OnSetupDocument(RadDocument document)
Parameters:documentRadDocument

The new document.

Sets the value respecting one way bindings.

C#
protected void SetValueRespectingOneWayBindings(IList<byte> value)
Parameters:valueIList<byte>

The value.

Unbinds the specified RadRichTextBox.

C#
protected virtual void Unbind(RadRichTextBox radRichTextBox)
Parameters:radRichTextBoxRadRichTextBox

The RRadRichTextBox.

Updates the bytes.

C#
public virtual void UpdateBytes()

Updates the document.

C#
public virtual void UpdateDocument()

Events

Occurs after the byte[] associated with this instance changes.

C#
protected event EventHandler BytesChanged

Occurs when an exception is thrown during import.

C#
public event EventHandler<DataProviderImportExceptionEventArgs> ImportException

Fires when the DataProvider creates new document.

C#
public event EventHandler<SetupDocumentEventArgs> SetupDocument