Assume that the below XAML is a style applied to a Path that is a visual element of an item data template for a collection, I want to bind to the collection in such a way that if this is the first element of a collection, the path is collapsed. How can I go about doing this?
<Style x:Key="PathStyle" TargetType="{x:Type Path}">
<Style.Triggers>
<DataTrigger Value="0" Binding="{Binding Index}">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>