|
[UPDATE] Found it..
I have a listbox with hyperlinks as the list items. But the selected item is a blue bar with white text. I'd like to remove the highlighting. Here's what I have so far:
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\Resources.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type TreeViewItem}">
<Style.Triggers>
<Trigger Property="IsMouseCaptureWithin" Value="True">
<Setter Property="IsSelected" Value="True" />
</Trigger>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="IsSelected" Value="True" />
</Trigger>
</Style.Triggers>
</Style>
<DataTemplate DataType="{x:Type models:JobModel}">
<StackPanel Orientation="Horizontal"
Margin="2">
<Image Source="/FMG.UI.WPF;component/Media/Images/job_72.png"
Height="16"
Width="16"
Margin="0,0,3,0"/>
<controls:TextBlockEx>
<Hyperlink Style="{StaticResource linkStyle}"
Command="{Binding SelectedJob, Mode=TwoWay}">
<TextBlock Text="{Binding JobNumber}"/>
</Hyperlink>
</controls:TextBlockEx>
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</UserControl.Resources>
and
<ListBox Grid.Row="1"
Grid.Column="0"
ItemsSource="{Binding Jobs}"
SelectedItem="{Binding SelectedJob}"
BorderThickness="1"
BorderBrush="#6593CF"
Margin="-1,0,-1,-1">
<ListBox.Resources>
<Style TargetType="{x:Type ListBoxItem}">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="Red"/>
<Setter Property="Background" Value="Transparent"/>
</Trigger>
</Style.Triggers>
</Style>
</ListBox.Resources>
</ListBox>
Can someone show me how to remove the selected item's fore & back color so it ddoesn't appear selected?
Thanks
If it's not broken, fix it until it is
|
|
|
|