skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DocumentElement

An abstract class representing a document element.

Inheritance
System.Object
DisposableObject
RadObject
DocumentElement
Block
Inline
RadDocument
Inherited Members
RadObject.BindingContextProperty
RadObject.RadType
RadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)
RadObject.DisposeManagedResources()
RadObject.ClearPropertyStore()
RadObject.SuspendPropertyNotifications()
RadObject.ResumePropertyNotifications()
RadObject.GetPropertyValue(RadProperty)
RadObject.SetDefaultValueOverride(RadProperty, Object)
RadObject.SetValueAtDesignTime(RadProperty, Object)
RadObject.GetValue(RadProperty)
RadObject.SetValue(RadProperty, Object)
RadObject.ResetValue(RadProperty)
RadObject.ResetLocalValue(RadProperty)
RadObject.ResetValue(RadProperty, ValueResetFlags)
RadObject.UpdateValue(RadProperty)
RadObject.GetValueSource(RadProperty)
RadObject.GetRegisteredRadProperty(String)
RadObject.UpdateValueCore(RadPropertyValue)
RadObject.SetValueCore(RadPropertyValue, Object, Object, ValueSource)
RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)
RadObject.GetDefaultValue(RadPropertyValue, Object)
RadObject.CoerceValue(RadPropertyValue, Object)
RadObject.ShouldSerializeProperty(PropertyDescriptor)
RadObject.ShouldSerializeProperty(RadProperty)
RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)
RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)
RadObject.UnbindProperty(RadProperty)
RadObject.AddStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(RadProperty)
RadObject.GetInheritedValue(RadProperty)
RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)
RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)
RadObject.OnNotifyPropertyChanged(String)
RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)
RadObject.IsPropertyCancelable(RadPropertyMetadata)
RadObject.PropertyValues
RadObject.IsDesignMode
RadObject.PropertyFilter
RadObject.RadObjectType
RadObject.BindingContext
RadObject.PropertyChanged
RadObject.RadPropertyChanged
RadObject.RadPropertyChanging
RadObject.ShouldSerializePropertyHandler
DisposableObject.GetBitState(Int64)
DisposableObject.SetBitState(Int64, Boolean)
DisposableObject.OnBitStateChanged(Int64, Boolean, Boolean)
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.PerformDispose(Boolean)
DisposableObject.DisposeUnmanagedResources()
DisposableObject.BitState
DisposableObject.Events
DisposableObject.IsDisposing
DisposableObject.IsDisposed
DisposableObject.Disposed
DisposableObject.Disposing
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinForms.Documents.Model
Assembly: Telerik.WinControls.RichTextEditor.dll

Syntax

public abstract class DocumentElement : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor

Constructors

DocumentElement()

Initializes a new instance of the DocumentElement class.

Declaration
protected DocumentElement()

Properties

ChildIndex

Gets the index of the element inside its parent structure.

Declaration
public int ChildIndex { get; }
Property Value
System.Int32

The index.

Children

Gets the children.

Declaration
public DocumentElementCollection Children { get; }
Property Value
DocumentElementCollection

The children.

Cursor

Gets or sets the cursor image used when the mouse pointer is over the document element.

Declaration
public virtual Cursor Cursor { get; set; }
Property Value
System.Windows.Forms.Cursor

The cursor.

DocumentElements

Gets the elements representing the children of this document element.

Declaration
protected DocumentElementCollection DocumentElements { get; }
Property Value
DocumentElementCollection

The document elements.

FirstLayoutBox

Represents the first LayoutBox responsible for showing the element.

Declaration
public LayoutBox FirstLayoutBox { get; }
Property Value
LayoutBox

The first layout box.

HasStyle

Gets a value indicating whether this instance has style.

Declaration
public bool HasStyle { get; }
Property Value
System.Boolean

true if this instance has style; otherwise, false.

IsFirstLayoutBoxInitialized

Gets a value indicating whether the FirstLayoutBox is initialized.

Declaration
protected bool IsFirstLayoutBoxInitialized { get; }
Property Value
System.Boolean

true if this instance is first layout box initialized; otherwise, false.

LastLayoutBox

Represents the last LayoutBox responsible for showing the element.

Declaration
public LayoutBox LastLayoutBox { get; }
Property Value
LayoutBox

The last layout box.

NextSibling

Gets the next sibling.

Declaration
public DocumentElement NextSibling { get; }
Property Value
DocumentElement

The next sibling.

OriginalProperties

Declaration
[XamlCompositePropertySerializable]
public DocumentElementPropertiesBase OriginalProperties { get; set; }
Property Value
DocumentElementPropertiesBase

Parent

Gets the parent.

Declaration
public DocumentElement Parent { get; }
Property Value
DocumentElement

The parent.

PreviousSibling

Gets the previous sibling.

Declaration
public DocumentElement PreviousSibling { get; }
Property Value
DocumentElement

The previous sibling.

RevisionInfo

Declaration
[XamlCompositePropertySerializable]
public RevisionInfo RevisionInfo { get; set; }
Property Value
RevisionInfo

Style

Gets or sets the style of the document element.

Declaration
public virtual StyleDefinition Style { get; set; }
Property Value
StyleDefinition

The style.

StyleName

Gets or sets the name of the style.

Declaration
[XamlSerializable("")]
public string StyleName { get; set; }
Property Value
System.String

The name of the style.

Tag

String property that allows developers to attach custom data to the DocumentElement. The value of this property will be copied to DocumentElements created out of this DocumentElement during editing.

Declaration
[XamlSerializable("")]
public virtual string Tag { get; set; }
Property Value
System.String

Methods

ClearValue(IStylePropertyDefinition)

Clears the value of a style property.

Declaration
public void ClearValue(IStylePropertyDefinition propertyDefinition)
Parameters
IStylePropertyDefinition propertyDefinition

The property definition.

CopyPropertiesFrom(DocumentElement)

Copies the properties from another document element.

Declaration
public void CopyPropertiesFrom(DocumentElement fromElement)
Parameters
DocumentElement fromElement

The element to copy the properties from.

Exceptions
System.NullReferenceException

fromElement must not be null.

System.InvalidOperationException

Cannot copy properties to element itself.

CopyPropertiesFromOverride(DocumentElement)

Copies the properties from another document element to the current instance.

Declaration
protected abstract void CopyPropertiesFromOverride(DocumentElement fromElement)
Parameters
DocumentElement fromElement

The DocumentElement to copy the properties from.

CopyPropertiesFromStyle(StyleDefinition)

Copies the properties from a specified style.

Declaration
public void CopyPropertiesFromStyle(StyleDefinition style)
Parameters
StyleDefinition style

The style to copy the properties from.

CreateDeepCopy()

Creates a deep copy of the element.

Declaration
public virtual DocumentElement CreateDeepCopy()
Returns
DocumentElement

The copied element.

CreateLayoutBox()

Creates a LayoutBox for the document element.

Declaration
protected LayoutBox CreateLayoutBox()
Returns
LayoutBox

The created LayoutBox.

CreateLayoutBox(DocumentStructureCollection)

Creates a LayoutBox for the element.

Declaration
public abstract LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)
Parameters
DocumentStructureCollection documentCollection

The document collection.

Returns
LayoutBox

CreateNewElementInstance()

Creates a new instance of this element.

Declaration
protected abstract DocumentElement CreateNewElementInstance()
Returns
DocumentElement

The new instance.

CreateShallowCopy()

Creates a shallow copy of the element.

Declaration
public virtual DocumentElement CreateShallowCopy()
Returns
DocumentElement

The copied element.

EnumerateChildrenOfType<T>()

Iterates through the children of the document element.

Declaration
public IEnumerable<T> EnumerateChildrenOfType<T>()
    where T : DocumentElement
Returns
System.Collections.Generic.IEnumerable<T>

A collection of all the child elements of the specified type.

Type Parameters
T

The type of document elements you would like to obtain.

ExtractStyleFromLocalProperties()

Extracts a style from the local properties of the element.

Declaration
public StyleDefinition ExtractStyleFromLocalProperties()
Returns
StyleDefinition

A StyleDefinition instance created from the element's local properties.

ExtractStyleFromProperties()

Extracts a style from the style properties of the element.

Declaration
public StyleDefinition ExtractStyleFromProperties()
Returns
StyleDefinition

A StyleDefinition instance created from the element's style properties.

GetAssociatedLayoutBoxes()

Gets the LayoutBoxes associated to the element.

Declaration
public IEnumerable<LayoutBox> GetAssociatedLayoutBoxes()
Returns
System.Collections.Generic.IEnumerable<LayoutBox>

Collection of the layout boxes associated to the element.

GetParentOfType<T>()

Iterates through the parent elements of the document element and returns the first occurence of a parent of the specified type.

Declaration
public T GetParentOfType<T>()
    where T : DocumentElement
Returns
T

The first parent of the specified type, or null if the element doesn't have parent.

Type Parameters
T

The type of document element you would like to obtain.

GetPropertyValueSource(IStylePropertyDefinition)

Gets the source of the value of a specified property.

Declaration
public RadValueSource GetPropertyValueSource(IStylePropertyDefinition propertyDefinition)
Parameters
IStylePropertyDefinition propertyDefinition

The property definition.

Returns
RadValueSource

A RadValueSource representing the source of the value.

GetRootDocument()

Gets the RadDocument instance associated to the element.

Declaration
public RadDocument GetRootDocument()
Returns
RadDocument

GetStyleProperty(String)

Gets a style property by name.

Declaration
public StylePropertyBase GetStyleProperty(string propertyName)
Parameters
System.String propertyName

The name of the property.

Returns
StylePropertyBase

The style property.

GetStyleProperty(IStylePropertyDefinition)

Gets a style property from a specified definition.

Declaration
public StylePropertyBase GetStyleProperty(IStylePropertyDefinition propertyDefinition)
Parameters
IStylePropertyDefinition propertyDefinition

The property definition.

Returns
StylePropertyBase

The style property.

InvalidateAssociatedBoxesArrange()

Invalidates the arrange of the layout boxes associated to this element.

Declaration
protected void InvalidateAssociatedBoxesArrange()

InvalidateAssociatedBoxesLayout()

Invalidates the layout of the layout boxes associated to this element.

Declaration
public void InvalidateAssociatedBoxesLayout()

InvalidateAssociatedBoxesMeasure()

Invalidates the measure of the layout boxes associated to this element.

Declaration
protected void InvalidateAssociatedBoxesMeasure()

OnParentChanged()

Called when the parent of the element has been changed.

Declaration
protected virtual void OnParentChanged()

OnParentChanging()

Called when the parent of the element is changing.

Declaration
protected virtual void OnParentChanging()

OnRemoved()

Called when a DocumentElement is removed.

Declaration
protected virtual void OnRemoved()

OnStyleChanged()

Called after the style of a document element has been changed.

Declaration
protected virtual void OnStyleChanged()

OnStyleChanging()

Called before the style of a document element changes.

Declaration
protected virtual void OnStyleChanging()

OnStylePropertyChanged(StylePropertyChangeEventArgs)

Declaration
protected virtual void OnStylePropertyChanged(StylePropertyChangeEventArgs args)
Parameters
StylePropertyChangeEventArgs args

Events

ParentChanged

Occurs after changing the parent of the element.

Declaration
public event EventHandler ParentChanged
Event Type
System.EventHandler

ParentChanging

Occurs before changing the parent of the element.

Declaration
public event EventHandler ParentChanging
Event Type
System.EventHandler

PropertyValueChanged

Occurs after changing the value of a property.

Declaration
public event StylePropertyChangeEventHandler PropertyValueChanged
Event Type
StylePropertyChangeEventHandler

StyleChanged

Called after the style of a document element has been changed.

Declaration
public event EventHandler StyleChanged
Event Type
System.EventHandler

StyleChanging

Called before the style of a document element changes.

Declaration
public event EventHandler StyleChanging
Event Type
System.EventHandler

StylePropertyChanged

Called after the style of a document element has been changed.

Declaration
public event StylePropertyChangeEventHandler StylePropertyChanged
Event Type
StylePropertyChangeEventHandler

Extension Methods

CommonExtensions.ClearIfNoBindingAndSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
CommonExtensions.SetIfDifferent(RadObject, RadProperty, Object)
CommonExtensions.ClearIfSet(RadObject, RadProperty)
CommonExtensions.IsLocalValueSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.