C# Class LinqTwit.Infrastructure.FocusBehavior

Inheritance: System.Windows.DependencyObject
Show file Open project: ArildF/linqtwit

Public Properties

Property Type Description
BindableFocusProperty System.Windows.DependencyProperty
FocusFirstElementOnLoadedProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetBindableFocus ( UIElement obj ) : bool
GetFocusFirstElementOnLoaded ( DependencyObject obj ) : bool
SetBindableFocus ( UIElement obj, bool value ) : void
SetFocusFirstElementOnLoaded ( DependencyObject obj, bool value ) : void

Private Methods

Method Description
BindableFocusChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
FocusElement ( object sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void
FocusFirstElementOnLoaded ( object sender, RoutedEventArgs args ) : void
FocusFirstElementOnLoadedPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes on the FocusFirstElementOnLoadedProperty dependency property. As WPF internally uses the dependency property system and bypasses the FocusFirstElement property wrapper, updates should be handled here.

GotKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
HookEvents ( UIElement c ) : void
LostKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Method Details

GetBindableFocus() public static method

public static GetBindableFocus ( UIElement obj ) : bool
obj System.Windows.UIElement
return bool

GetFocusFirstElementOnLoaded() public static method

public static GetFocusFirstElementOnLoaded ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject
return bool

SetBindableFocus() public static method

public static SetBindableFocus ( UIElement obj, bool value ) : void
obj System.Windows.UIElement
value bool
return void

SetFocusFirstElementOnLoaded() public static method

public static SetFocusFirstElementOnLoaded ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject
value bool
return void

Property Details

BindableFocusProperty public static property

Command Dependency Property.
public static DependencyProperty,System.Windows BindableFocusProperty
return System.Windows.DependencyProperty

FocusFirstElementOnLoadedProperty public static property

public static DependencyProperty,System.Windows FocusFirstElementOnLoadedProperty
return System.Windows.DependencyProperty