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

Provides a pooled visual for a floating image block and positions it relative to the current view.

Definition

Namespace:Telerik.WinForms.Documents.UI.UIProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class FloatingImageUIProvider : IUIProvider

Inheritance: objectFloatingImageUIProvider

Implements: IUIProvider

Constructors

Initializes a provider for a floating image layout box.

C#
public FloatingImageUIProvider(FloatingBlockLayoutBox floatingImageBox)
Parameters:floatingImageBoxFloatingBlockLayoutBox

The floating block whose content is an image.

Properties

Gets the floating image's content bounds used by the layer's viewport-visibility check.

C#
public RectangleF BoundingRectangle { get; }

Implements: IUIProvider.BoundingRectangle

Gets or sets the layer to which the image visual is attached.

C#
public IUILayer ContainingLayer { get; set; }

Implements: IUIProvider.ContainingLayer

Gets the context supplied when the provider's image visual was last added to a layer.

C#
public UILayerUpdateContext CurrentUpdateContext { get; }

Gets the floating-block layout box associated with this provider.

C#
public FloatingBlockLayoutBox FloatingBox { get; }

Gets the layout box that supplies the image content.

C#
public ImageLayoutBox ImageBox { get; }

Gets the pooled image visual hosted by the layer.

C#
public Image ImageUI { get; }

Gets whether the provider should be recreated; after the image visual is created, this reflects whether the floating box is a clone.

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

Implements: IUIProvider.IsInvalidated

Gets whether the floating block has been removed from the document layout.

C#
public bool IsRemoved { get; }

Implements: IUIProvider.IsRemoved

Methods

Positions the image using its layout bounds, with a different vertical coordinate when the floating box is a clone.

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

The current layer context.

Implements: IUIProvider.Arrange(UILayerUpdateContext)

Gets the image visual, creating it from the object pool on the first request.

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

The presenter and viewport information for the update.

Returns:

IEnumerable<UIElement>

The floating image visual to add to the layer.

Implements: IUIProvider.GetUIElements(UILayerUpdateContext)

Clears the visual's layout association and returns it to the context's object pool.

C#
public void ReleaseElements()

Implements: IUIProvider.ReleaseElements()

Refreshes the image visual using the owner's current scale factor.

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

The current layer context.

Implements: IUIProvider.UpdateUI(UILayerUpdateContext)