Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit b39c520

Browse files
authored
Fix issue with Content Page behaviors (#652)
This allows behaviors to be attached to page events via <ContentPage.Behaviors> 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
1 parent e93ec41 commit b39c520

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Behaviors/EventToCommandBehavior/EventToCommandBehavior/Behaviors/EventToCommandBehavior.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace EventToCommandBehavior
77
{
8-
public class EventToCommandBehavior : BehaviorBase<View>
8+
public class EventToCommandBehavior : BehaviorBase<VisualElement>
99
{
1010
Delegate eventHandler;
1111

@@ -34,13 +34,13 @@ public IValueConverter Converter {
3434
set { SetValue (InputConverterProperty, value); }
3535
}
3636

37-
protected override void OnAttachedTo (View bindable)
37+
protected override void OnAttachedTo (VisualElement bindable)
3838
{
3939
base.OnAttachedTo (bindable);
4040
RegisterEvent (EventName);
4141
}
4242

43-
protected override void OnDetachingFrom (View bindable)
43+
protected override void OnDetachingFrom (VisualElement bindable)
4444
{
4545
DeregisterEvent (EventName);
4646
base.OnDetachingFrom (bindable);

0 commit comments

Comments
 (0)