Absolute z-order (across several DataTemplates)
问题 Ive a ListBox with a Canvas ItemsPanel that displays 2 different types of objects: NodeVMs and LinkLineVMs (using a CompositeCollection). Each VM object has a DataTemplate: NodeVMs DataTemplate has a TextBlock (A) LinkLineVMs DataTemplate has a Line (B) and a TextBlock (C) How get the following absolute z-order: A (top), C, B (bottom). <ListBox> <ListBox.Resources> <DataTemplate DataType="{x:Type p:NodeVM}"> <StackPanel> <TextBlock ... /> ... </StackPanel> </DataTemplate> <DataTemplate