I've got an ItemsControl that has multiple different datatemplates set under resources and each of these have their own ZIndex property from the class they represent. For each of these, I've attempted to bind to the Panel.ZIndex of the controls but changing the bound property doesn't change the controls ZIndex at all.
<ItemsControl x:Name="MapPageItemsControl"
Width="700" Height="500"
ItemsSource="{Binding MapPageBaseClassList, UpdateSourceTrigger=PropertyChanged}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas Background="Transparent" Width="700" Height="500"
VirtualizingPanel.IsVirtualizing="True"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type local:CanvasLine}" >
<Path x:Name="canvasLine" Stroke="Black"
StrokeThickness="0.5"
Data="{Binding Converter={StaticResource LinePathConverter}}" StrokeDashCap="Round"
Panel.ZIndex="{Binding ZIndex}">
</Path>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>