I have a buttons in process flow shape, which looks nice but on hover the ugly blue highlights appear underneath. How can I remove it?
Button 2 is highlighted:
Resource Dictionary:
<Style x:Key="ButtonStyleMainRed" TargetType="{x:Type Button}">
<Setter Property="Background" Value="#37474f"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Grid>
<Path Fill="{TemplateBinding Background}"
Data="F1 M 0.78429,0.50002L 128.79,0.50002L 161.069,32.7785L 129.055,64.7919L 0.500001,64.7919L 32.5214,32.7705L 0.516563,0.765584" />
<TextBlock Text="Test"
VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14" Foreground="White" TextWrapping="WrapWithOverflow"/>
<Rectangle Name="Led" Width="50" Height="4" Fill="#d50000" Margin="0,40,0,0" RadiusX="2" RadiusY="2"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsFocused" Value="True"/>
<Trigger Property="IsDefaulted" Value="True"/>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#263238"></Setter>
<Setter TargetName="Led" Property="Fill" Value="#f44336"></Setter>
</Trigger>
<Trigger Property="IsPressed" Value="True"/>
<Trigger Property="IsEnabled" Value="False"/>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
View:
<views:BaseView.Resources>
<DataTemplate x:Key="FlowStageTemplate">
<StackPanel>
<Button x:Name="ProcessStageButton"
Tag="{Binding ID}"
Command="{Binding DataContext.OnButtonClickCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding ElementName=TurulStageButton}"
Style="{Binding FlowStageDisplayStyle}"
Width="160" Height="65" Margin="0,0,-24,0" >
</Button>
</StackPanel>
</DataTemplate>
</views:BaseView.Resources>
<StackPanel>
<ListView ItemsSource="{Binding FlowStagesMainMenu}" ItemTemplate="{StaticResource FlowStageTemplate}"
Height="67" BorderThickness="0" Background="#263238" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="ItemBackgroundHover" Color="Transparent" />
<SolidColorBrush x:Key="ItemBackgroundSelected" Color="Transparent" />
</ListView.Resources>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
</ListView>
</StackPanel>
I have tried to hide it by the below, but no change:
<SolidColorBrush x:Key="ItemBackgroundHover" Color="Transparent" />
<SolidColorBrush x:Key="ItemBackgroundSelected" Color="Transparent" />