bovender framework
C# framework that implements MVVM and more
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. 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.

Definition at line 33 of file WindowState.cs.

Member Function Documentation

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"

Definition at line 88 of file WindowState.cs.

Member Data Documentation

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

Definition at line 76 of file WindowState.cs.

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

Definition at line 37 of file WindowState.cs.


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