<syncfusion:SfButton x:Name="iconButton" IsCheckable="False" BorderWidth="0" BackgroundColor="Transparent" PressedBackgroundColor="Transparent"> <syncfusion:SfButton.Content> <Image Source="Test1.png" HorizontalOptions="Center" VerticalOptions="Center"/> syncfusion:SfButton.Content> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Pressed" > <VisualState.Setters> <Setter Property="Content"> <Image Source="Test2.png" HorizontalOptions="Center" VerticalOptions="Center"/> Setter> VisualState.Setters> VisualState> <VisualState x:Name="Normal"> <VisualState.Setters> <Setter Property="Content"> <Image Source="Test1.png" HorizontalOptions="Center" VerticalOptions="Center"/> Setter> VisualState.Setters> VisualState> VisualStateGroup> VisualStateManager.VisualStateGroups> syncfusion:SfButton>
<buttons:SfButton ShowIcon="True"
ImageSource="Normal.png">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Pressed" >
<VisualState.Setters>
<Setter Property="ImageSource" Value="Pressed.png">
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="ImageSource" Value="Normal.png">
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</buttons:SfButton> |
<buttons:SfButton BackgroundImage="Normal.png"
HorizontalOptions="Center"
HeightRequest="40"
WidthRequest="40"
VerticalOptions="Center">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Pressed" >
<VisualState.Setters>
<Setter Property="BackgroundImage" Value="Pressed.png">
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundImage" Value="Normal.png">
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</buttons:SfButton> |