I have a button style declared in Xaml, I did a Click Event in my C# file to, when clicked, change some style but now, when clicked again, I want to reset my styles to inicial style. How I can manage the clicks and reset the style?
<flv:FlowListView FlowColumnCount="3" SeparatorVisibility="None" HasUnevenRows="true"
FlowItemTappedCommand="{Binding ItemTappedCommand}" FlowLastTappedItem="{Binding LastTappedItem}"
FlowItemsSource="{Binding MyCategories}" >
<flv:FlowListView.FlowColumnTemplate>
<DataTemplate>
<Button Text="{Binding Name}"
TextColor="White"
x:Name="categoryButtons"
Clicked="ButtonSelected"
ContentLayout="Top"
BackgroundColor="Transparent"
BorderColor="White"
BorderWidth="2"
CornerRadius="6"
Margin="5,5,5,10" />
</DataTemplate>
</flv:FlowListView.FlowColumnTemplate>
</flv:FlowListView>
public void ButtonSelected(object sender, EventArgs e)
{
var button = (Button)sender;
button.BackgroundColor = Color.Blue;
}