From ef359c1777cb340db930d7392201db0f44b12e02 Mon Sep 17 00:00:00 2001 From: dbergan Date: Sun, 9 Aug 2020 22:50:43 -0500 Subject: [PATCH] Fix issue with Content Page behaviors This allows behaviors to be attached to page events via like Appearing and Disappearing. Without this fix, we get the cryptic following error: "Additional information: bindable not an instance of AssociatedType" Original discussion and solution here: https://forums.xamarin.com/discussion/comment/230200/#Comment_230200 --- .../Behaviors/EventToCommandBehavior.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Behaviors/EventToCommandBehavior/EventToCommandBehavior/Behaviors/EventToCommandBehavior.cs b/Behaviors/EventToCommandBehavior/EventToCommandBehavior/Behaviors/EventToCommandBehavior.cs index 83c1758ecf..06239781fd 100755 --- a/Behaviors/EventToCommandBehavior/EventToCommandBehavior/Behaviors/EventToCommandBehavior.cs +++ b/Behaviors/EventToCommandBehavior/EventToCommandBehavior/Behaviors/EventToCommandBehavior.cs @@ -5,7 +5,7 @@ namespace EventToCommandBehavior { - public class EventToCommandBehavior : BehaviorBase + public class EventToCommandBehavior : BehaviorBase { Delegate eventHandler; @@ -34,13 +34,13 @@ public IValueConverter Converter { set { SetValue (InputConverterProperty, value); } } - protected override void OnAttachedTo (View bindable) + protected override void OnAttachedTo (VisualElement bindable) { base.OnAttachedTo (bindable); RegisterEvent (EventName); } - protected override void OnDetachingFrom (View bindable) + protected override void OnDetachingFrom (VisualElement bindable) { DeregisterEvent (EventName); base.OnDetachingFrom (bindable);