Daniel's XL Toolbox NG
Bovender.Mvvm.Views.Settings.WindowState Class Reference

Provides an attached property to enable Windows to save and restore their screen position and state. More...

Static Public Member Functions

static bool GetSave (UIElement element)
 
static void SetSave (UIElement element, bool value)
 
static bool GetCenterScreen (UIElement element)
 Centers the Window that the property is attached to on the screen that the window is currently being displayed on. This also works with WPF windows that are creaed by a VSTO addin where the native "WindowStartupLocation" does not work. More...
 
static void SetCenterScreen (UIElement element, bool value)
 
static bool GetSave (UIElement element)
 
static void SetSave (UIElement element, bool value)
 
static bool GetCenterScreen (UIElement element)
 Centers the Window that the property is attached to on the screen that the window is currently being displayed on. This also works with WPF windows that are creaed by a VSTO addin where the native "WindowStartupLocation" does not work. More...
 
static void SetCenterScreen (UIElement element, bool value)
 

Static Public Attributes

static readonly DependencyProperty SaveProperty
 
static readonly DependencyProperty CenterScreenProperty
 

Detailed Description

Provides an attached property to enable Windows to save and restore their screen position and state.

Member Function Documentation

◆ GetCenterScreen() [1/2]

static bool Bovender.Mvvm.Views.Settings.WindowState.GetCenterScreen ( UIElement  element)
inlinestatic

Centers the Window that the property is attached to on the screen that the window is currently being displayed on. This also works with WPF windows that are creaed by a VSTO addin where the native "WindowStartupLocation" does not work.

Parameters
elementUI element to center on screen, must be a Window
Returns
Attached property "CenterScreen"

◆ GetCenterScreen() [2/2]

static bool Bovender.Mvvm.Views.Settings.WindowState.GetCenterScreen ( UIElement  element)
inlinestatic

Centers the Window that the property is attached to on the screen that the window is currently being displayed on. This also works with WPF windows that are creaed by a VSTO addin where the native "WindowStartupLocation" does not work.

Parameters
elementUI element to center on screen, must be a Window
Returns
Attached property "CenterScreen"

◆ GetSave() [1/2]

static bool Bovender.Mvvm.Views.Settings.WindowState.GetSave ( UIElement  element)
inlinestatic

◆ GetSave() [2/2]

static bool Bovender.Mvvm.Views.Settings.WindowState.GetSave ( UIElement  element)
inlinestatic

◆ SetCenterScreen() [1/2]

static void Bovender.Mvvm.Views.Settings.WindowState.SetCenterScreen ( UIElement  element,
bool  value 
)
inlinestatic

◆ SetCenterScreen() [2/2]

static void Bovender.Mvvm.Views.Settings.WindowState.SetCenterScreen ( UIElement  element,
bool  value 
)
inlinestatic

◆ SetSave() [1/2]

static void Bovender.Mvvm.Views.Settings.WindowState.SetSave ( UIElement  element,
bool  value 
)
inlinestatic

◆ SetSave() [2/2]

static void Bovender.Mvvm.Views.Settings.WindowState.SetSave ( UIElement  element,
bool  value 
)
inlinestatic

Member Data Documentation

◆ CenterScreenProperty

static readonly DependencyProperty Bovender.Mvvm.Views.Settings.WindowState.CenterScreenProperty
static
Initial value:
= DependencyProperty.RegisterAttached(
"CenterScreen", typeof(bool), typeof(WindowState), new PropertyMetadata(OnCenterScreenPropertyChanged))

◆ SaveProperty

static readonly DependencyProperty Bovender.Mvvm.Views.Settings.WindowState.SaveProperty
static
Initial value:
= DependencyProperty.RegisterAttached(
"Save", typeof(bool), typeof(WindowState), new PropertyMetadata(OnSavePropertyChanged))

The documentation for this class was generated from the following file: