Typically, the ListBox not responsible for the contents of the elements themselves, including the Foreground color, if necessary, they use. Elements can be a series of images, in this case Foreground does not make sense. Elements can be a complex multi-element interface containing various text elements, each of which needs different Foreground colors, therefore the ListBox idea supplying one Foreground color Foreground not make sense.
That's why the default template for the Item container uses ContentPresenter , which basically means "place the content of the subordinate element here."
If you want to create a new style for lists in general for using container elements in your styles, you will have to accept this restriction, your VSM will not be able to find out the details of the contained element.
However, if you create a container style for a specific ListBox instance, and you understand the type and nature of the elements presented, you do not need to save the ContentPresenter in the template. You can directly replace what ever Xaml you need to represent each element.
For example, you can replace ContentPresenter in Xaml as follows: -
<Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> <TextBlock x:Name="ContentItem" Text="{Binding Property1, Mode=OneWay}" TextWrapping="Wrap" Foreground="#FFDC1C1C"/> </Grid>
Note that the Padding and HorizontalAlignment elements of the elements are the same as for the presenter. In this case, I use as a single TextBlock called "ContentItem" and bind it to the property of the original objects Property1 .
Now that the template contains a named TextBlock to display the item, I can play Foreground with VSM to change its Foreground for various different Visual states.