Class FocusExtension
Behavior to change focus using a binded property partially used this answer https://stackoverflow.com/a/7972361 removed the if (e.OldValue == null) that forced the IsFocused to false/true on lost/got focus in out use case the IsFocus is updated in the view model hence here
Inheritance
Object
FocusExtension
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Sdl.Desktop.Platform.Controls.Behaviours
Assembly: Sdl.Desktop.Platform.Controls.dll
Syntax
public static class FocusExtension
Fields
IsFocusedProperty
Declaration
public static readonly DependencyProperty IsFocusedProperty
Field Value
Type | Description |
---|---|
Dependency |
Methods
GetIsFocused(DependencyObject)
Declaration
public static bool? GetIsFocused(DependencyObject element)
Parameters
Type | Name | Description |
---|---|---|
Dependency |
element |
Returns
Type | Description |
---|---|
Nullable<Boolean> |
SetIsFocused(DependencyObject, Nullable<Boolean>)
Declaration
public static void SetIsFocused(DependencyObject element, bool? value)
Parameters
Type | Name | Description |
---|---|---|
Dependency |
element | |
Nullable<Boolean> | value |