Skip to content

Commit

Permalink
Added ImageButton sample using VisualStateManager (#7296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuarezruiz committed May 23, 2022
1 parent d5981b9 commit 1ed1db6
Showing 1 changed file with 29 additions and 0 deletions.
Expand Up @@ -92,6 +92,35 @@
WidthRequest="40"
HeightRequest="40"
Clicked="OnResizeImageButtonClicked"/>
<Label
Text="Using VisualStateManager"
Style="{StaticResource Headline}"/>
<ImageButton
Source="cog.png"
Background="Green"
HorizontalOptions="Center"
WidthRequest="200"
HeightRequest="100">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Scale" Value="1" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Focused">
<VisualState.Setters>
<Setter Property="Scale" Value="1" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Property="Scale" Value="0.8" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</ImageButton>
</VerticalStackLayout>
</ScrollView>
</views:BasePage.Content>
Expand Down

0 comments on commit 1ed1db6

Please sign in to comment.