Binding to a property on AnimationType #1968
-
Is it possible to bind a property on This is not working for me, the opacity just stays at the default 0.3: <Grid HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
BackgroundColor="Red">
<Grid.Behaviors>
<toolkit:AnimationBehavior>
<toolkit:AnimationBehavior.AnimationType>
<toolkit:FadeAnimation Opacity="{Binding OffOpacity}" />
</toolkit:AnimationBehavior.AnimationType>
</toolkit:AnimationBehavior>
</Grid.Behaviors>
</Grid> |
Beta Was this translation helpful? Give feedback.
Answered by
bijington
Jun 21, 2024
Replies: 2 comments 1 reply
-
That should in theory work given the property is bindable. There might be an issue with the BindingContext not being inherited down. To prove that you could try manually setting the BindingContext on the FadeAnimation and see if that solves it. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nathanAjacobs
-
Closed as Answered. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That should in theory work given the property is bindable. There might be an issue with the BindingContext not being inherited down. To prove that you could try manually setting the BindingContext on the FadeAnimation and see if that solves it.