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

Provides the shared interaction state and mouse handling for Details-view column resizing.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public abstract class BaseColumnResizingBehavior

Inheritance: objectBaseColumnResizingBehavior

Derived Classes: ColumnResizingBehaviorStrechColumnResizingBehavior

Constructors

Creates a resize behavior for the specified list-view element.

C#
public BaseColumnResizingBehavior(RadListViewElement owner)
Parameters:ownerRadListViewElement

The element whose columns and mouse interaction are managed.

Fields

Stores the last mouse position used to calculate the next resize offset.

C#
protected Point lastMousePosition

Stores the mouse cursor that must be restored when a resize operation ends.

C#
protected Cursor originalMouseCursor

Properties

Gets or sets whether a resize operation can begin.

C#
public bool AllowColumnResize { get; set; }
Property Value:

true to allow resizing; otherwise, false.

Gets or sets whether a resize operation is in progress.

C#
public bool IsResizing { get; set; }

Gets the list-view element whose columns this behavior manages.

C#
public RadListViewElement Owner { get; }
Property Value:

The owning element.

Gets or sets the column currently being resized.

C#
public ListViewDetailColumn ResizedColumn { get; set; }
Property Value:

The active column, or null when no column is being resized.

Methods

Begins resizing the specified column when resizing is enabled and the owner is in Details view.

C#
public virtual bool BeginResize(ListViewDetailColumn column, Point mousePosition)
Parameters:columnListViewDetailColumn

The column to resize.

mousePositionPoint

The current mouse position used as the resize baseline.

Returns:

bool

true if resizing begins; otherwise, false.

Calculates the column widths.

C#
public abstract void CalculateColumnWidths(SizeF availableSize)
Parameters:availableSizeSizeF

Size of the available.

Ends resizing, releases mouse capture, clears the active column, and restores the prior cursor.

C#
public virtual void EndResize()

Converts mouse movement into a resize offset, reversing it for right-to-left layouts.

C#
public virtual void HandleMouseMove(Point mousePosition)
Parameters:mousePositionPoint

The current mouse position.

Applies a horizontal offset to the active resize operation.

C#
public abstract bool Resize(int offset)
Parameters:offsetint

The signed width change requested by mouse movement.

Returns:

bool

Whether the offset was accepted. HandleMouseMove(Point) uses this result to decide whether to advance its stored mouse position.