Uppdelningsläge
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
public class BehaviorBase<T> : Behavior<T> where T : BindableObject
|
||||
{
|
||||
public T AssociatedObject { get; private set; }
|
||||
public T? AssociatedObject { get; private set; }
|
||||
|
||||
protected override void OnAttachedTo(T bindable)
|
||||
{
|
||||
@ -22,8 +22,9 @@ public class BehaviorBase<T> : Behavior<T> where T : BindableObject
|
||||
AssociatedObject = null;
|
||||
}
|
||||
|
||||
void OnBindingContextChanged(object sender, EventArgs e)
|
||||
void OnBindingContextChanged(object? sender, EventArgs e)
|
||||
{
|
||||
BindingContext = AssociatedObject.BindingContext;
|
||||
if (AssociatedObject != null)
|
||||
BindingContext = AssociatedObject.BindingContext;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user