C# Class MahTweets.Configuration.WindowSettings

Persists a Window's Size, Location and WindowState to UserScopeSettings
Datei anzeigen Open project: nickhodge/MahTweets.LawrenceHargrave Class Usage Examples

Public Properties

Property Type Description
SaveProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
Attach void
CreateWindowApplicationSettingsInstance WindowApplicationSettings
GetWindowPlacement bool
OnSaveInvalidated void
SetWindowPlacement bool
WindowClosing void
WindowSourceInitialized void

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
CreateWindowApplicationSettingsInstance ( ) : WindowApplicationSettings
GetWindowPlacement ( IntPtr hWnd, WINDOWPLACEMENT &lpwndpl ) : bool
OnSaveInvalidated ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Called when Save is changed on an object.

SetWindowPlacement ( IntPtr hWnd, [ lpwndpl ) : bool
WindowClosing ( object sender, CancelEventArgs e ) : void
WindowSourceInitialized ( 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_oe static_oe property

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