Class
BinaryDataProviderBase

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:

cs-api-definition
public class BinaryDataProviderBase : FrameworkElement

Inheritance: objectBinaryDataProviderBase

Derived Classes: DocxDataProvider

Constructors

BinaryDataProviderBase(IDocumentFormatProvider, DependencyObject, DependencyProperty)

Initializes a new instance of the BinaryDataProviderBase class.

Declaration

cs-api-definition
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyObject propertyOwner, DependencyProperty bytesProperty)

Parameters

formatProvider

IDocumentFormatProvider

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

cs-api-definition
public BinaryDataProviderBase(IDocumentFormatProvider formatProvider, DependencyProperty bytesProperty)

Parameters

formatProvider

IDocumentFormatProvider

The format provider.

bytesProperty

DependencyProperty

The bytes property.

Fields

FormatProviderProperty

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

Declaration

cs-api-definition
public static readonly DependencyProperty FormatProviderProperty

Field Value

DependencyProperty

RichTextBoxProperty

The rich text box property.

Declaration

cs-api-definition
public static readonly DependencyProperty RichTextBoxProperty

Field Value

DependencyProperty

UpdateSourceTriggerProperty

The update source trigger property.

Declaration

cs-api-definition
public static readonly DependencyProperty UpdateSourceTriggerProperty

Field Value

DependencyProperty

Properties

Bytes

Gets or sets the bytes.

Declaration

cs-api-definition
protected IList<byte> Bytes { get; set; }

Property Value

IList<byte>

The bytes.

FormatProvider

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

Declaration

cs-api-definition
public IDocumentFormatProvider FormatProvider { get; set; }

Property Value

IDocumentFormatProvider

RichTextBox

Gets or sets the RadRichTextBox this DataProvider is attached to.

Declaration

cs-api-definition
public RadRichTextBox RichTextBox { get; set; }

Property Value

RadRichTextBox

UpdateSourceTrigger

Gets or sets the update source trigger.

Declaration

cs-api-definition
public DataProviderUpdateSourceTrigger UpdateSourceTrigger { get; set; }

Property Value

DataProviderUpdateSourceTrigger

The update source trigger.

Methods

Bind(RadRichTextBox)

Binds the specified RadRichTextBox.

Declaration

cs-api-definition
protected virtual void Bind(RadRichTextBox radRichTextBox)

Parameters

radRichTextBox

RadRichTextBox

The RadRichTextBox.

BytesPropertyChangedCallback(DependencyObject, DependencyPropertyChangedEventArgs)

The callback invoked when the Bytes property changes.

Declaration

cs-api-definition
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

cs-api-definition
protected static DependencyProperty CreateBytesProperty(string name)

Parameters

name

string

The name.

Returns

DependencyProperty

OnBytesChanged()

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

Declaration

cs-api-definition
protected virtual void OnBytesChanged()

OnImportException(DataProviderImportExceptionEventArgs)

Raises the event.

Declaration

cs-api-definition
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

cs-api-definition
protected virtual void OnSetupDocument(RadDocument document)

Parameters

document

RadDocument

The new document.

SetValueRespectingOneWayBindings(IList<byte>)

Sets the value respecting one way bindings.

Declaration

cs-api-definition
protected void SetValueRespectingOneWayBindings(IList<byte> value)

Parameters

value

IList<byte>

The value.

Unbind(RadRichTextBox)

Unbinds the specified RadRichTextBox.

Declaration

cs-api-definition
protected virtual void Unbind(RadRichTextBox radRichTextBox)

Parameters

radRichTextBox

RadRichTextBox

The RRadRichTextBox.

UpdateBytes()

Updates the bytes.

Declaration

cs-api-definition
public virtual void UpdateBytes()

UpdateDocument()

Updates the document.

Declaration

cs-api-definition
public virtual void UpdateDocument()

Events

BytesChanged

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

Declaration

cs-api-definition
protected event EventHandler BytesChanged

Event Value

EventHandler

ImportException

Occurs when an exception is thrown during import.

Declaration

cs-api-definition
public event EventHandler<DataProviderImportExceptionEventArgs> ImportException

Event Value

EventHandler<DataProviderImportExceptionEventArgs>

SetupDocument

Fires when the DataProvider creates new document.

Declaration

cs-api-definition
public event EventHandler<SetupDocumentEventArgs> SetupDocument

Event Value

EventHandler<SetupDocumentEventArgs>