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

Coordinates measure and arrange queues for a RadElement tree and dispatches layout notifications.

Definition

Namespace:Telerik.WinControls.Layouts

Assembly:Telerik.WinControls.dll

Syntax:

C#
public sealed class ContextLayoutManager : ILayoutManager, IDisposable

Inheritance: objectContextLayoutManager

Implements: IDisposableILayoutManager

Constructors

Creates a layout manager that uses the specified handler to dispatch deferred layout callbacks.

C#
public ContextLayoutManager(ILayoutHandler layoutHandler)
Parameters:layoutHandlerILayoutHandler

The callback dispatcher associated with this manager.

Properties

Gets the queue of elements waiting to be arranged.

C#
public ILayoutQueue ArrangeQueue { get; }

Implements: ILayoutManager.ArrangeQueue

Gets whether the manager is processing a layout pass or an element measure or arrange call.

C#
public bool IsUpdating { get; }

Implements: ILayoutManager.IsUpdating

Gets the handlers that are notified after a layout pass completes without remaining work.

C#
public List<EventHandler> LayoutEvents { get; }

Implements: ILayoutManager.LayoutEvents

Gets the queue of elements waiting to be measured.

C#
public ILayoutQueue MeasureQueue { get; }

Implements: ILayoutManager.MeasureQueue

Methods

Queues size-change information for notification after layout processing.

C#
public void AddToSizeChangedChain(SizeChangedInfo info)
Parameters:infoSizeChangedInfo

The element's size-change information.

Implements: ILayoutManager.AddToSizeChangedChain(SizeChangedInfo)

Completes a call previously recorded by IncrementLayoutCalls().

C#
public void DecrementLayoutCalls()

Implements: ILayoutManager.DecrementLayoutCalls()

Clears pending layout state and releases the handler reference without disposing the handler.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Enters an arrange operation and tracks its nesting depth.

C#
public void EnterArrange()
Exceptions: InvalidOperationException

The arrange nesting exceeds the manager's recursion limit.

Implements: ILayoutManager.EnterArrange()

Enters a measure operation and tracks its nesting depth.

C#
public void EnterMeasure()
Exceptions: InvalidOperationException

The measure nesting exceeds the manager's recursion limit.

Implements: ILayoutManager.EnterMeasure()

Exits an arrange operation entered with EnterArrange().

C#
public void ExitArrange()

Implements: ILayoutManager.ExitArrange()

Exits a measure operation entered with EnterMeasure().

C#
public void ExitMeasure()

Implements: ILayoutManager.ExitMeasure()

Marks the start of an element measure or arrange call so IsUpdating reflects that work. Pair each call with DecrementLayoutCalls().

C#
public void IncrementLayoutCalls()

Implements: ILayoutManager.IncrementLayoutCalls()

Requests a deferred layout update through the associated handler.

C#
public void InvokeUpdateLayoutAsync()

Implements: ILayoutManager.InvokeUpdateLayoutAsync()

Removes an element's pending measure and arrange requests.

C#
public void RemoveElementFromQueues(RadElement e)
Parameters:eRadElement

The element to remove from both queues.

Implements: ILayoutManager.RemoveElementFromQueues(RadElement)

Processes pending measure and arrange requests unless a layout pass or recursive measure/arrange operation is active.

C#
public void UpdateLayout()

Implements: ILayoutManager.UpdateLayout()