15 BindableProperty.CreateAttached(
16 propertyName:
"State",
17 returnType: typeof(
object),
20 propertyChanged: OnStateChanged);
25 public static object?
GetState(BindableObject View)
32 public static void SetState(BindableObject View,
object? Value)
35 static void OnStateChanged(BindableObject Bindable,
object? OldValue,
object? NewValue)
37 Console.WriteLine($
"New state for {Bindable.GetType().Name} : Value: {NewValue}");
Provides an attached State property for any BindableObject, usable in DataTriggers in place of Visual...
static ? object GetState(BindableObject View)
Gets the State attached property.
static readonly BindableProperty StateProperty
Attached State property (e.g. string or enum).
static void SetState(BindableObject View, object? Value)
Sets the State attached property. When set, optionally you could call VisualStateManager....