ContentControlBase
Base implementation for rendered structured document tags, mapping their state to the outline, thumbs, and interaction state.
Definition
Namespace:Telerik.WinControls.RichTextEditor.UI
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public abstract class ContentControlBase : Control, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ISupportDrop, IContentControl
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElementFrameworkElementControlContentControlBase...
Derived Classes:
Implements:
Inherited Members
Constructors
protected ContentControlBase()
Fields
Identifies the AliasFontSize dependency property.
public static readonly RadProperty AliasFontSizeProperty
Identifies the Alias dependency property.
public static readonly RadProperty AliasProperty
Identifies the Focused dependency property.
public static readonly RadProperty FocusedProperty
Identifies the Hovered dependency property.
public static readonly RadProperty HoveredProperty
Tracks whether template application has begun so state synchronization can update the visual children.
protected bool isTemplateApplied
Identifies the LineThickness dependency property.
public static readonly RadProperty LineThicknessProperty
Identifies the OutlineColor dependency property.
public static readonly RadProperty OutlineColorProperty
Identifies the PolygonPoints dependency property.
public static readonly RadProperty PolygonPointsProperty
Identifies the SelectCommand dependency property.
public static readonly RadProperty SelectCommandProperty
Identifies the Selected dependency property.
public static readonly RadProperty SelectedProperty
Identifies the TextFlowDirection dependency property.
public static readonly RadProperty TextFlowDirectionProperty
Identifies the ThumbShouldBeVisible dependency property.
public static readonly RadProperty ThumbShouldBeVisibleProperty
Identifies the TopThumbButtonShouldBeVisible dependency property.
public static readonly RadProperty TopThumbButtonShouldBeVisibleProperty
Properties
Gets or sets the value indicating the font size of the alias text.
public double AliasFontSize { get; set; }
Gets the polygon used to draw the content control's body outline.
public Polygon BodyBorder { get; }
Gets the polygon that represents the content control's body and handles its mouse input.
public Polygon BodyFill { get; }
Gets or sets the state object used to synchronize this visual control with its structured document tag.
public object DataContext { get; set; }
Gets or sets whether the content control is displayed in its focused state, which controls its outline and thumb visibility.
public bool Focused { get; set; }
Gets or sets the value that indicates whether or not the control is hovered.
public bool Hovered { get; set; }
Gets the toggle button hosted in the left-side thumb container.
public RadToggleButtonElement LeftThumb { get; }
Gets the container for the left-side thumb after the visual template has been applied.
public ContentControlBorder LeftThumbContainer { get; }
Gets or sets the value that indicates the line thickness of the polygon.
public double LineThickness { get; set; }
Gets or sets the value that indicates the color of the control.
public Color OutlineColor { get; set; }
Gets or sets the value that indicates the point collection defining the bounding polygon.
public PointCollection PolygonPoints { get; set; }
Gets or sets the value that indicates the command to be executed when the control is selected.
public ICommand SelectCommand { get; set; }
Gets or sets the value that indicates whether the control should be highlighted or not.
public bool Selected { get; set; }
Gets or sets the value that indicates the text flow direction.
public FlowDirection TextFlowDirection { get; set; }
Gets or sets the value that indicates whether to show the thumb or not.
public bool ThumbShouldBeVisible { get; set; }
Gets the toggle button hosted in the top-side thumb container.
public RadToggleButtonElement TopThumb { get; }
Gets or sets the value indicating whether the button inside the top thumb should be visible or not.
public bool TopThumbButtonShouldBeVisible { get; set; }
Gets the container for the top-side thumb after the visual template has been applied.
public ContentControlBorder TopThumbContainer { get; }
Methods
Creates the polygon used to draw the content control's body outline.
protected virtual Polygon CreateMainBodyBorderElement()
A polygon named for the main body border.
Creates the body polygon that receives mouse input for the content control.
protected virtual Polygon CreateMainBodyFillElement()
A polygon named for the main body fill and configured to handle mouse input.
Creates a toggle-button thumb using the vertical-ellipsis glyph and parent mouse-input notifications.
protected virtual RadToggleButtonElement CreateThumb()
A toggle button configured for use as a content-control thumb.
Creates a border container that handles mouse input for a content-control thumb.
protected virtual ContentControlBorder CreateThumbContainer()
A thumb container with the default cursor and mouse handling enabled.
Refreshes thumb visibility and body-fill opacity after the visual children are created.
protected virtual void ForceUpdateUIState()
Gets the name of the element holding the content of the control.
Gets the current state of the control.
Determines whether the top thumb is used for the state's alias; the base implementation requires a non-empty alias.
protected virtual bool GetTopThumbButtonShouldBeVisible(ContentControlState state)
The content-control state used to determine thumb presentation.
Returns:Initializes the content control with provided state.
public virtual void Initialize(ContentControlState state)
The state with which the control should be initialized.
Implements:
Always reports the overlay as inside the visible clip bounds, regardless of the supplied rectangle.
This method is called before an UI element is displayed.
public override void OnApplyTemplate()
Overrides:
Copies changes from the state object to the corresponding content-control properties and visuals.
protected virtual void OnStatePropertyChanged(object sender, PropertyChangedEventArgs e)
The ContentControlState that changed.
ePropertyChangedEventArgsIdentifies the changed state property.
Provides an extension point for derived controls to synchronize state specific to their child visuals.
protected virtual void SyncDataContextChildState()
Copies the current state object's properties to the control and synchronizes its child visuals after template application.
protected virtual void SyncDataContextState()
Copies the current polygon points to both the body fill and body border visuals.
protected virtual void UpdateChildrenPolygonPoints()
Selects the top or left thumb, shows it only when focused and requested, hides the alternate thumb, and shows the outline while focused.
protected virtual void UpdateChildrenVisibleUIState()
Sets the body fill to 0.2 opacity on hover while unfocused and clears it otherwise.
protected virtual void UpdateMainBodyFillOpacity()
Updates the state of the control.
public virtual void UpdateState(ContentControlState state)
The state to be applied to the control.
Implements:
Applies the selected state to the active thumb and disables that thumb while selected.
protected virtual void UpdateToggleUIState()