Provides the shared embedded-editor behavior for page header and footer presenters.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public abstract class HeaderFooterPresenterBase : FrameworkElement, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ISupportDrop
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElementFrameworkElementHeaderFooterPresenterBase...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes the overlay rectangle used by the presenter.
public HeaderFooterPresenterBase()
Initializes the overlay rectangle and associates the presenter with the specified UI layer container.
public HeaderFooterPresenterBase(IUILayerContainer owner)
The UI layer container that owns this presenter.
Properties
Gets the section layout box whose header or footer is displayed by this presenter.
protected SectionLayoutBox AssociatedSectionBox { get; }
Gets the inner RadRichTextBox of this presenter.
protected RadRichTextBox BodyRichTextBox { get; }
Gets the type of editor this presenter is.
public abstract DocumentEditorType DocumentEditorType { get; }
Gets or sets a value indicating whether the presenter is currently editing the document header and footer.
protected bool IsInEditHeaderFooterMode { get; set; }
Gets the rectangle whose visibility and height track the header/footer edit mode.
protected Rectangle MouseClickRectangle { get; }
Gets the overlay rectangle displayed over this header or footer.
public Rectangle OveralyRectangle { get; }
Gets the UI layer container associated with this presenter.
protected IUILayerContainer Owner { get; }
Gets the owning editor container, or null when no owner is assigned.
protected IDocumentEditorPresenterContainer OwnerDocumentEditor { get; }
Gets the stack panel used to constrain the presenter's height after its template is applied.
protected StackLayoutElement WrappingStackPanel { get; }
Methods
Removes all references and unsubscribe from events.
public void CleanUp()
Gets the content of the presenter.
protected abstract RadDocument GetBody()
A RadDocument with the contents of the presenter.
Gets the height of the presenter.
Disables automatic sizing so the page layout can control the presenter's bounds.
protected override void InitializeFields()
Overrides:
Marks that the inner RadRichTextBox should be invalidated.
public void InvalidateBody()
Creates the embedded editor, synchronizes applicable owner settings, and subscribes to document and owner events.
public override void OnApplyTemplate()
Overrides:
Keeps the embedded editor sized to the presenter and invalidates the presenter when its bounds change.
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
Overrides:
Sets the provided section layout box as the associated to the presenter.
protected void SetAssociatedSectionBox(SectionLayoutBox value, bool delayed)
The section layout box.
delayedboolDetermines if the any updates should be executed with a delay.
Sets the provided document to the inner RadRichTextBox without notifications.
protected void SetDocumentSilently(RadDocument document)
The document to set.
Sets the height of the presenter.
Updates the content of the resenter with the associated section.
public void Update(SectionLayoutBox sectionBox, bool isInEditHeaderFooterMode, bool shouldFocus, bool delayed)
The section box to associate with.
isInEditHeaderFooterModeboolDetermines whether to enter edit mode.
shouldFocusboolDetermines whether the inner RadRichTextBox should be focused.
delayedboolDefines whether the update shoudl be executed with a slight delay.
Updates the content of the resenter with the associated section.
public void Update(SectionLayoutBox associatedSectionBox, bool isInEditHeaderFooterMode, bool shouldFocus)
The section box to associate with.
isInEditHeaderFooterModeboolDetermines whether to enter edit mode.
shouldFocusboolDetermines whether the inner RadRichTextBox should be focused.
Updates the inner RadRichTextBox margins from the owner RadRichTextBox.
protected abstract void UpdateBodyMargin()
Updates the onwer editor header/footer editing context with the provided one.
protected abstract void UpdateOwnerEditingContext(HeaderFooterEditingContext context)
Updates the owner header or footer UI context of the pwner editor.
protected abstract void UpdateOwnerUIContext()
Updates the source RadRichTextBox with the content from this presenter.
protected abstract void UpdateSource()