Table of Contents

Class WindowStateControl

Namespace
Tudormobile.Wpf.Controls
Assembly
Tudormobile.WpfControls.dll

Manages window state via minimize, maximize, and close buttons.

This control adds a close button and optional Minimize/Maximize buttons and attaches behavior to their containing Window to manage window state (normal, minimize, maximize). It is designed to to be used on a transparent window with custom chrome (or no chrome).

You can set the CanMinimize/CanMaximize properties to enable minimize/maximize window states. (Default is TRUE). You can set the ShowMinMax property to show/hide the minimize/maximize buttons. (Default is TRUE). You can set the AllowDrag property to allow move/drag function on the host window. (Default is TRUE).

public class WindowStateControl : Control, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient
Inheritance
WindowStateControl
Implements
Inherited Members

Properties

AllowDrag

Provide drag/move window functionality.

public bool AllowDrag { get; set; }

Property Value

bool

CanMaximize

True if user can maximize.

public bool CanMaximize { get; set; }

Property Value

bool

CanMinimize

True if user can minimize (minimze button enabled).

public bool CanMinimize { get; set; }

Property Value

bool

ShowMinMax

True if min/max buttons are present.

public bool ShowMinMax { get; set; }

Property Value

bool

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnMouseLeave(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseLeave attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnMouseLeave(MouseEventArgs e)

Parameters

e MouseEventArgs

The MouseEventArgs that contains the event data.