skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class WindowPresenterBase

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

Inheritance
System.Object
WindowPresenterBase
Namespace: Telerik.Windows.Controls.InternalWindow
Assembly: Telerik.Windows.Controls.Navigation.dll

Syntax

public class WindowPresenterBase : ContentPresenter

Constructors

WindowPresenterBase(IDragAware)

Initializes a new instance of the WindowPresenterBase class.

Declaration
public WindowPresenterBase(IDragAware windowHost)
Parameters
IDragAware windowHost

Fields

CaptionHeightProperty

Dependency property for the height of the window caption.

Declaration
public static readonly DependencyProperty CaptionHeightProperty
Field Value
System.Windows.DependencyProperty

LeftProperty

Dependency property for the left position of the window presenter.

Declaration
public static readonly DependencyProperty LeftProperty
Field Value
System.Windows.DependencyProperty

ResizeBorderProperty

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

Declaration
public static readonly DependencyProperty ResizeBorderProperty
Field Value
System.Windows.DependencyProperty

SizeToContentProperty

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

Declaration
public static readonly DependencyProperty SizeToContentProperty
Field Value
System.Windows.DependencyProperty

TopProperty

Dependency property for the top position of the window presenter.

Declaration
public static readonly DependencyProperty TopProperty
Field Value
System.Windows.DependencyProperty

WindowHeightProperty

Dependency property for the window height.

Declaration
public static readonly DependencyProperty WindowHeightProperty
Field Value
System.Windows.DependencyProperty

WindowResizeModeProperty

Dependency property for the window resize mode.

Declaration
public static readonly DependencyProperty WindowResizeModeProperty
Field Value
System.Windows.DependencyProperty

WindowStateProperty

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

Declaration
public static readonly DependencyProperty WindowStateProperty
Field Value
System.Windows.DependencyProperty

WindowWidthProperty

Dependency property for the window width.

Declaration
public static readonly DependencyProperty WindowWidthProperty
Field Value
System.Windows.DependencyProperty

Properties

CaptionHeight

Gets or sets the height of the window caption.

Declaration
public double CaptionHeight { get; set; }
Property Value
System.Double

DragAware

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

Declaration
public IDragAware DragAware { get; }
Property Value
IDragAware

InitialPosition

Gets or sets the initial position of the window presenter.

Declaration
protected Rect InitialPosition { get; set; }
Property Value
System.Windows.Rect

Left

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

Declaration
public double Left { get; set; }
Property Value
System.Double

ResizeBorder

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

Declaration
public Thickness ResizeBorder { get; set; }
Property Value
System.Windows.Thickness

SizeToContent

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

Declaration
public bool SizeToContent { get; set; }
Property Value
System.Boolean

Top

Gets or sets the top position of the window presenter.

Declaration
public double Top { get; set; }
Property Value
System.Double

A double representing the top position in pixels.

WindowHeight

Gets or sets the height of the window.

Declaration
public double WindowHeight { get; set; }
Property Value
System.Double

WindowResizeMode

Gets or sets the mode for resizing the window.

Declaration
public ResizeMode WindowResizeMode { get; set; }
Property Value
System.Windows.ResizeMode

WindowState

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

Declaration
public WindowState WindowState { get; set; }
Property Value
System.Windows.WindowState

WindowWidth

Gets or sets the width of the window.

Declaration
public double WindowWidth { get; set; }
Property Value
System.Double

Methods

CoerceThumb(ThumbType)

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

Declaration
protected ThumbType CoerceThumb(ThumbType input)
Parameters
ThumbType input

Returns
ThumbType

GenerateHitTestRectangles()

Generates hit test rectangles for the window presenter.

Declaration
protected Rect[] GenerateHitTestRectangles()
Returns
System.Windows.Rect[]

GetMaximumSize()

Gets the maximum size for the window presenter.

Declaration
protected virtual Size GetMaximumSize()
Returns
System.Windows.Size

MeasureOverride(Size)

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

Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
System.Windows.Size availableSize

Returns
System.Windows.Size

OnWindowPositionChanged()

Called when the position of the window changes.

Declaration
protected virtual void OnWindowPositionChanged()

OnWindowSizeChanged()

Called when the size of the window changes.

Declaration
protected virtual void OnWindowSizeChanged()

OnWindowStateChanged(WindowState)

Called when the size of the window changes.

Declaration
protected virtual void OnWindowStateChanged(WindowState oldState)
Parameters
System.Windows.WindowState oldState

Resize(Rect)

Resizes the window presenter based on the provided position.

Declaration
protected void Resize(Rect position)
Parameters
System.Windows.Rect position

SetSizeAndPosition(Rect)

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

Declaration
protected void SetSizeAndPosition(Rect rect)
Parameters
System.Windows.Rect rect

UpdatePosition(Rect)

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

Declaration
protected void UpdatePosition(Rect position)
Parameters
System.Windows.Rect position

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.