WindowPresenterBase
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:
public class WindowPresenterBase : ContentPresenter
Inheritance: objectWindowPresenterBase
Constructors
Initializes a new instance of the WindowPresenterBase class.
Fields
CaptionHeightProperty
DependencyProperty
Dependency property for the height of the window caption.
public static readonly DependencyProperty CaptionHeightProperty
LeftProperty
DependencyProperty
Dependency property for the left position of the window presenter.
public static readonly DependencyProperty LeftProperty
ResizeBorderProperty
DependencyProperty
Dependency property for the resize border thickness of the window presenter.
public static readonly DependencyProperty ResizeBorderProperty
SizeToContentProperty
DependencyProperty
Dependency property for indicating whether the window should automatically size itself to fit its content.
public static readonly DependencyProperty SizeToContentProperty
TopProperty
DependencyProperty
Dependency property for the top position of the window presenter.
public static readonly DependencyProperty TopProperty
WindowHeightProperty
DependencyProperty
Dependency property for the window height.
public static readonly DependencyProperty WindowHeightProperty
WindowResizeModeProperty
DependencyProperty
Dependency property for the window resize mode.
public static readonly DependencyProperty WindowResizeModeProperty
WindowStateProperty
DependencyProperty
Dependency property for the window state, which can be Normal, Minimized, or Maximized.
public static readonly DependencyProperty WindowStateProperty
WindowWidthProperty
DependencyProperty
Dependency property for the window width.
public static readonly DependencyProperty WindowWidthProperty
Properties
Gets or sets the height of the window caption.
public double CaptionHeight { get; set; }
Gets or sets a value indicating whether drag operations are allowed for the window.
public IDragAware DragAware { get; }
InitialPosition
Rect
Gets or sets the initial position of the window presenter.
protected Rect InitialPosition { get; set; }
Gets or sets the left position of the window presenter in the coordinate space of its parent container.
public double Left { get; set; }
ResizeBorder
Thickness
Resizes the border of the window presenter based on the provided dimensions.
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.
public bool SizeToContent { get; set; }
Gets or sets the top position of the window presenter.
public double Top { get; set; }
A double representing the top position in pixels.
Gets or sets the height of the window.
public double WindowHeight { get; set; }
WindowResizeMode
ResizeMode
Gets or sets the mode for resizing the window.
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.
public WindowState WindowState { get; set; }
Gets or sets the width of the window.
public double WindowWidth { get; set; }
Methods
Generates hit test rectangles for the window presenter.
protected Rect[] GenerateHitTestRectangles()
Rect[]
GetMaximumSize()
Size
Gets the maximum size for the window presenter.
protected virtual Size GetMaximumSize()
Size
Measures the size of the window presenter based on the available size.
protected override Size MeasureOverride(Size availableSize)
Size
Called when the position of the window changes.
protected virtual void OnWindowPositionChanged()
Called when the size of the window changes.
protected virtual void OnWindowSizeChanged()
Called when the size of the window changes.
protected virtual void OnWindowStateChanged(WindowState oldState)
Resizes the window presenter based on the provided position.
protected void Resize(Rect position)
Sets the size and position of the window presenter based on the provided rectangle.
protected void SetSizeAndPosition(Rect rect)
Updates the position of the window presenter based on the provided rectangle.
protected void UpdatePosition(Rect position)