1
votes

The title pretty much says it all. I can roll my own, but given WPF has it, it's conspicuous by its absence.

1
Is ItemTemplate not enough?Chris W.
no, I'm using a template selector for ItemTemplate and want to separate each element with a line, but not have to include the divide in each ItemTemplateJim O'Neil

1 Answers

1
votes

I think exactly answered may only Silverlight developers, but they usually do not like to answer such questions. Silverlight is much stripped down version of WPF, it is done because MSDN:

To keep Silverlight small and lightweight, some WPF and .NET Framework features are not available in Silverlight.

Why is removed ItemContainerStyle? Probably thought he was there in ListBox, so as an alternative you can use ListBox.ItemContainerStyle.

Although the developers could not just remove the ItemContainerStyle property from ItemsControl class, because this property is not in ListBox WPF, he inherits is from Selector class and Selector from ItemsControl like this:

[Localizability(LocalizationCategory.ListBox)]
[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(ListBoxItem))]
public class ListBox : Selector
{
   ...
}

This once again proves that it is a deliberate decision taken at the design stage of Silverlight.

In fact, many things in Silverlight and in WPF are implemented differently. Therefore, I advise you to see this links, but again, this is only a small (common) part of the difference:

Contrasting Silverlight and WPF

WPF Compatibility