New to Telerik UI for WPFStart a free 30-day trial

Represents the base class for window presenters in the Telerik Windows controls. This class provides common functionality for managing window presentation and behavior.

Definition

Namespace:Telerik.Windows.Controls.InternalWindow

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
public class WindowPresenterBase : ContentPresenter

Inheritance: objectWindowPresenterBase

Constructors

Initializes a new instance of the WindowPresenterBase class.

C#
public WindowPresenterBase(IDragAware windowHost)
Parameters:windowHostIDragAware

Fields

CaptionHeightProperty

DependencyProperty

Dependency property for the height of the window caption.

C#
public static readonly DependencyProperty CaptionHeightProperty

LeftProperty

DependencyProperty

Dependency property for the left position of the window presenter.

C#
public static readonly DependencyProperty LeftProperty

ResizeBorderProperty

DependencyProperty

Dependency property for the resize border thickness of the window presenter.

C#
public static readonly DependencyProperty ResizeBorderProperty

SizeToContentProperty

DependencyProperty

Dependency property for indicating whether the window should automatically size itself to fit its content.

C#
public static readonly DependencyProperty SizeToContentProperty

TopProperty

DependencyProperty

Dependency property for the top position of the window presenter.

C#
public static readonly DependencyProperty TopProperty

WindowHeightProperty

DependencyProperty

Dependency property for the window height.

C#
public static readonly DependencyProperty WindowHeightProperty

WindowResizeModeProperty

DependencyProperty

Dependency property for the window resize mode.

C#
public static readonly DependencyProperty WindowResizeModeProperty

WindowStateProperty

DependencyProperty

Dependency property for the window state, which can be Normal, Minimized, or Maximized.

C#
public static readonly DependencyProperty WindowStateProperty

WindowWidthProperty

DependencyProperty

Dependency property for the window width.

C#
public static readonly DependencyProperty WindowWidthProperty

Properties

Gets or sets the height of the window caption.

C#
public double CaptionHeight { get; set; }

Gets or sets a value indicating whether drag operations are allowed for the window.

C#
public IDragAware DragAware { get; }

Gets or sets the initial position of the window presenter.

C#
protected Rect InitialPosition { get; set; }

Gets or sets the left position of the window presenter in the coordinate space of its parent container.

C#
public double Left { get; set; }

ResizeBorder

Thickness

Resizes the border of the window presenter based on the provided dimensions.

C#
public Thickness ResizeBorder { get; set; }

Gets or sets a value that indicates whether the window will automatically size itself to fit the content of its child elements.

C#
public bool SizeToContent { get; set; }

Gets or sets the top position of the window presenter.

C#
public double Top { get; set; }
Property Value:

A double representing the top position in pixels.

Gets or sets the height of the window.

C#
public double WindowHeight { get; set; }

Gets or sets the mode for resizing the window.

C#
public ResizeMode WindowResizeMode { get; set; }

WindowState

WindowState

Gets or sets the state of the window, indicating whether it is minimized, maximized, or in its normal state.

C#
public WindowState WindowState { get; set; }

Gets or sets the width of the window.

C#
public double WindowWidth { get; set; }

Methods

Coerces the thumb type based on the current window state and resize mode.

C#
protected ThumbType CoerceThumb(ThumbType input)
Parameters:inputThumbTypeReturns:

ThumbType

Generates hit test rectangles for the window presenter.

C#
protected Rect[] GenerateHitTestRectangles()
Returns:

Rect[]

Gets the maximum size for the window presenter.

C#
protected virtual Size GetMaximumSize()
Returns:

Size

Measures the size of the window presenter based on the available size.

C#
protected override Size MeasureOverride(Size availableSize)
Parameters:availableSizeSizeReturns:

Size

Called when the position of the window changes.

C#
protected virtual void OnWindowPositionChanged()

Called when the size of the window changes.

C#
protected virtual void OnWindowSizeChanged()

Called when the size of the window changes.

C#
protected virtual void OnWindowStateChanged(WindowState oldState)
Parameters:oldStateWindowState

Resizes the window presenter based on the provided position.

C#
protected void Resize(Rect position)
Parameters:positionRect

Sets the size and position of the window presenter based on the provided rectangle.

C#
protected void SetSizeAndPosition(Rect rect)
Parameters:rectRect

Updates the position of the window presenter based on the provided rectangle.

C#
protected void UpdatePosition(Rect position)
Parameters:positionRect