DataTemplate, Style, Triggers
Posted
by plotnick
on Stack Overflow
See other posts from Stack Overflow
or by plotnick
Published on 2010-04-05T18:49:48Z
Indexed on
2010/04/05
18:53 UTC
Read the original article
Hit count: 443
Could you guys help me? I have a with custom and in it:
<ListBox>
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderBrush="Black" BorderThickness="2" CornerRadius="5">
<Image Source="{Binding Picture}" />
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Now when I'm choosing the ListBoxItem it gets ugly with blue colored row selection. I'd like to change it. I want to color only border's background and nothing else. Also I want to change OnMouseOver behavior. I've tried trough triggers, but ContentPresenter doesn't have Background property. help me pls.
© Stack Overflow or respective owner