The title pretty much says it all. I can roll my own, but given WPF has it, it's conspicuous by its absence.
1 Answers
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 inSilverlight
.
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:
ItemTemplate
not enough? – Chris W.