Show / Hide Table of Contents

Class WpfWindowExtensions

Contains extensions for the Window and IWpfWindow classes.

Inheritance
object
WpfWindowExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Helpers
Assembly: MCART.Wpf.Common.dll
Syntax
public static class WpfWindowExtensions

Methods

| Edit this page View Source

HookHelp(Window, HandledEventHandler)

Enables the Windows help button on a window and attaches a handler for its click event.

Declaration
public static void HookHelp(this Window window, HandledEventHandler handler)
Parameters
Type Name Description
Window window

Window in which to enable the help button.

HandledEventHandler handler

Delegate that defines the action to execute when the window's help button is clicked.

| Edit this page View Source

HookHelp(IWpfWindow, HandledEventHandler)

Enables the Windows help button on a window and attaches a handler for its click event.

Declaration
public static void HookHelp(this IWpfWindow window, HandledEventHandler handler)
Parameters
Type Name Description
IWpfWindow window

Window in which to enable the help button.

HandledEventHandler handler

Delegate that defines the action to execute when the window's help button is clicked.

| Edit this page View Source

PerformWindowDrag(Window?, int, MouseButtonEventArgs)

Performs a window drag operation.

Declaration
public static void PerformWindowDrag(this Window? window, int rightChromeWidth, MouseButtonEventArgs e)
Parameters
Type Name Description
Window window

The window to drag.

int rightChromeWidth

Width of the area left of the window chrome to exclude from the drag position calculation. Used when restoring a maximized window that has user‑defined chrome; it equals the sum of the widths of controls left of the chrome.

MouseButtonEventArgs e

Drag arguments generated in the MouseDown event of the control used as the drag point.

Remarks

This method can be attached to a MouseDown event of a control that can serve as a drag point for a WPF window.

| Edit this page View Source

PerformWindowDrag(Window?, MouseButtonEventArgs)

Performs a window drag operation.

Declaration
public static void PerformWindowDrag(this Window? window, MouseButtonEventArgs e)
Parameters
Type Name Description
Window window

The window to drag.

MouseButtonEventArgs e

Drag arguments generated in the MouseDown event of the control used as the drag point.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX