WPF XAML: How to trigger style change in ListBoxItem ancestor to user class?
Posted
by dhovel
on Stack Overflow
See other posts from Stack Overflow
or by dhovel
Published on 2010-06-06T18:25:55Z
Indexed on
2010/06/06
18:32 UTC
Read the original article
Hit count: 233
I have an ObservableCollection of items of my class "PlaylistItem" that implements INotifyPropertyChanged. The collection is databound to a ListBox and everything else is working.
I want to know what markup to use to trigger a style change of the wrapping ListBoxItem based on a property (e.g. "Playing", bool) of the PlaylistItem. How to I use FindAncestor to trigger the change? I can to this in code, but I know I that I can (somehow) do it in markup.
Thanks in advance.
© Stack Overflow or respective owner