ButtonContentControl
Base for structured document tag controls with an auxiliary button positioned at the trailing edge of their last line.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class ButtonContentControl : ContentControlBase, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ISupportDrop, IContentControl
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElementFrameworkElementControlContentControlBaseButtonContentControl...
Derived Classes:
Implements:
Inherited Members
Constructors
public ButtonContentControl()
Fields
Identifies the ButtonHeight dependency property.
public static readonly RadProperty ButtonHeightProperty
The calculated origin used to arrange the auxiliary button according to the content's text flow direction.
protected Point buttonOrigin
Identifies the ButtonShouldBeVisible dependency property.
public static readonly RadProperty ButtonShouldBeVisibleProperty
Identifies the ButtonWidth dependency property.
public static readonly RadProperty ButtonWidthProperty
Properties
Gets the border container that hosts the auxiliary button after template application.
public ContentControlBorder ButtonContainer { get; }
Gets the auxiliary button element after template application.
public RadButtonElement ButtonElemement { get; }
Get or sets the value that indicates the height of the button.
public double ButtonHeight { get; set; }
Gets or sets the value that indicates whether the button should be visible or not.
public bool ButtonShouldBeVisible { get; set; }
Gets or sets the value that indicates the width of the button.
public double ButtonWidth { get; set; }
Methods
Arranges the button container at the calculated origin along the control's trailing edge.
Creates the border container that hosts the auxiliary button, initially collapsed.
protected virtual ContentControlBorder CreateButtonContainerElement()
A collapsed button container.
Creates the plus-glyph action button used by the base button content control.
protected virtual RadButtonElement CreateButtonElement()
A button configured with the content-control glyph font and parent mouse-input notifications.
Determines whether the auxiliary button is visible; the base implementation shows it while the control is focused.
protected virtual bool GetButtonShouldBeVisible(ContentControlState state)
The state used to determine button visibility.
Returns:The value of Focused.
Creates the named button parts and delegates other names to the base content control.
protected override VisualElement GetTemplateChild(string childName)
The template-part name to resolve.
Returns:The matching button part, or the base control's result for other names.
Overrides:
Measures the button container and button using ButtonWidth and ButtonHeight.
Creates and attaches the button visuals, wires their click event, and synchronizes the button with the current state.
public override void OnApplyTemplate()
Overrides:
Updates button visibility, selected state, or outline color when the corresponding state property changes.
protected override void OnStatePropertyChanged(object sender, PropertyChangedEventArgs e)
The content-control state that changed.
ePropertyChangedEventArgsIdentifies the changed state property.
Overrides:
Synchronizes the button's visibility, selected state, and outline color from the current button-content-control state.
protected override void SyncDataContextChildState()
Overrides: