Binding to a property on AnimationType #1968
Answered
by
bijington
nathanAjacobs
asked this question in
Q&A
-
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: 1 comment 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
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.