New to Telerik UI for WinForms? Start a free 30-day trial

Renders the background fill for a paragraph, table cell, or table layout box.

Definition

Namespace:Telerik.WinForms.Documents.UI.UIProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class BackgroundUIProvider : IUIProvider

Inheritance: objectBackgroundUIProvider

Implements: IUIProvider

Constructors

Initializes a provider for a paragraph, table-cell, or table layout box.

C#
public BackgroundUIProvider(LayoutBox layoutBox)
Parameters:layoutBoxLayoutBox

The layout box whose document element provides the fill color.

Properties

Gets the pooled rectangle used to render the background.

C#
public Rectangle BackgroundUI { get; }

Gets the current layout bounds of the background element.

C#
public RectangleF BoundingRectangle { get; }

Implements: IUIProvider.BoundingRectangle

Gets or sets the layer that hosts the background rectangle.

C#
public IUILayer ContainingLayer { get; set; }

Implements: IUIProvider.ContainingLayer

Gets the most recently supplied layer-update context.

C#
public UILayerUpdateContext CurrentUpdateContext { get; }

Gets whether the background rectangle must be recreated after a clone is materialized or its fill changes.

C#
public bool IsInvalidated { get; protected set; }

Implements: IUIProvider.IsInvalidated

Gets whether the associated layout box has been removed.

C#
public bool IsRemoved { get; }

Implements: IUIProvider.IsRemoved

Gets the layout box whose document element supplies the background color.

C#
public LayoutBox LayoutBox { get; }

Methods

Sizes and positions the background rectangle to match the layout box in the current view.

C#
public void Arrange(UILayerUpdateContext uILayerUpdateContext)
Parameters:uILayerUpdateContextUILayerUpdateContext

The current layer context.

Implements: IUIProvider.Arrange(UILayerUpdateContext)

Lazily creates the background rectangle and subscribes to changes of the document element's background.

C#
public IEnumerable<UIElement> GetUIElements(UILayerUpdateContext context)
Parameters:contextUILayerUpdateContext

The current layer context.

Returns:

IEnumerable<UIElement>

The rectangle that renders the background.

Exceptions: NotImplementedException

The layout box is associated with an unsupported document-element type.

Implements: IUIProvider.GetUIElements(UILayerUpdateContext)

Detaches the background-change handler and returns the rectangle to the object pool.

C#
public void ReleaseElements()

Implements: IUIProvider.ReleaseElements()

Does nothing; background-color changes invalidate the provider so the rectangle can be recreated with the new fill.

C#
public virtual void UpdateUI(UILayerUpdateContext uILayerUpdateContext)
Parameters:uILayerUpdateContextUILayerUpdateContext

The current layer context.

Implements: IUIProvider.UpdateUI(UILayerUpdateContext)