Updated: November 2007
Used within the template of an item control to specify the place in the control’s visual tree where the ItemsPanel defined by the ItemsControl is to be added.
<LocalizabilityAttribute(LocalizationCategory.NeverLocalize)> _ Public Class ItemsPresenter _ Inherits FrameworkElement
Dim instance As ItemsPresenter
[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)] public class ItemsPresenter : FrameworkElement
[LocalizabilityAttribute(LocalizationCategory::NeverLocalize)] public ref class ItemsPresenter : public FrameworkElement
/** @attribute LocalizabilityAttribute(LocalizationCategory.NeverLocalize) */ public class ItemsPresenter extends FrameworkElement
public class ItemsPresenter extends FrameworkElement
<ItemsPresenter .../>
The following example shows how to use an ItemsPresenter in a control template for a HeaderedItemsControl.
<!--Define a control template for a HeaderedItemsControl--> <Style TargetType="HeaderedItemsControl"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type HeaderedItemsControl}"> <StackPanel> <Grid> <Rectangle Fill="{TemplateBinding Background}"/> <ContentPresenter ContentSource="Header"/> </Grid> <Grid> <Rectangle Stroke="{TemplateBinding BorderBrush}"/> <ItemsPresenter Margin="2,0,0,0"/> </Grid> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style>
Windows Vista