Using a RelativeSource
binding with AncestorType
being ListBoxItem
.
<DataTrigger Binding="{Binding IsSelected,
RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
Value="True">
(May want to reverse the logic and Collapse
on False
instead, avoids the default value Setter
)