Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to change property value on state or event

$
0
0

I would like to know if its possible to change the a property value depending on a event.

Like changing the source of an image or the background color of a grid when the user press the ContentView or the Grid.

Something like :


<VisualState x:Name="Pressed">
  <Storyboard>
    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MainGrid" Storyboard.TargetProperty="BackgroundColor">
      <DiscreteObjectKeyFrame KeyTime="0" Value="Red" />
    </ObjectAnimationUsingKeyFrames>
  </Storyboard>
</VisualState>

I'm using Xamarin forms 2.0, Thanks!


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>