C# Class BlipFace.Helpers.WindowSettings

Persists a Window's Size, Location to UserScopeSettings
Show file Open project: ksopyla/blipface Class Usage Examples

Public Properties

Property Type Description
SaveProperty System.Windows.DependencyProperty

Public Methods

Method Description
SetSave ( DependencyObject dependencyObject, bool enabled ) : void
WindowSettings ( Window window ) : System

Protected Methods

Method Description
LoadWindowState ( ) : void

Load the Window Size Location and State from the settings object

SaveWindowState ( ) : void

Save the Window Size, Location and State to the settings object

Private Methods

Method Description
Attach ( ) : void
OnSaveInvalidated ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Called when Save is changed on an object.

window_Closing ( object sender, CancelEventArgs e ) : void
window_Initialized ( object sender, EventArgs e ) : void

Method Details

LoadWindowState() protected method

Load the Window Size Location and State from the settings object
protected LoadWindowState ( ) : void
return void

SaveWindowState() protected method

Save the Window Size, Location and State to the settings object
protected SaveWindowState ( ) : void
return void

SetSave() public static method

public static SetSave ( DependencyObject dependencyObject, bool enabled ) : void
dependencyObject System.Windows.DependencyObject
enabled bool
return void

WindowSettings() public method

public WindowSettings ( Window window ) : System
window System.Windows.Window
return System

Property Details

SaveProperty public static property

Register the "Save" attached property and the "OnSaveInvalidated" callback
public static DependencyProperty,System.Windows SaveProperty
return System.Windows.DependencyProperty