ItemsPresenter
ItemsPresenter
ItemsPresenter
ItemsPresenter
Class
Definition
Specifies where items are placed in a control, usually an ItemsControl.
public : sealed class ItemsPresenter : FrameworkElement, IItemsPresenter, IItemsPresenter2, IScrollSnapPointsInfopublic sealed class ItemsPresenter : FrameworkElement, IItemsPresenter, IItemsPresenter2, IScrollSnapPointsInfoPublic NotInheritable Class ItemsPresenter Inherits FrameworkElement Implements IItemsPresenter, IItemsPresenter2, IScrollSnapPointsInfo// This API is not available in Javascript.
<ItemsPresenter .../>
- Inheritance
-
ItemsPresenterItemsPresenterItemsPresenterItemsPresenter
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited properties
Inherited events
Inherited methods
Constructors
ItemsPresenter() ItemsPresenter() ItemsPresenter() ItemsPresenter()
Initializes a new instance of the ItemsPresenter class.
public : ItemsPresenter()public ItemsPresenter()Public Sub New()// This API is not available in Javascript.
Properties
AreHorizontalSnapPointsRegular AreHorizontalSnapPointsRegular AreHorizontalSnapPointsRegular AreHorizontalSnapPointsRegular
Gets a value that indicates whether the horizontal snap points for the ItemsPresenter are equidistant from each other.
public : PlatForm::Boolean AreHorizontalSnapPointsRegular { get; }public bool AreHorizontalSnapPointsRegular { get; }Public ReadOnly Property AreHorizontalSnapPointsRegular As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
True if the horizontal snap points for the ItemsPresenter are equidistant from each other; otherwise, false.
AreVerticalSnapPointsRegular AreVerticalSnapPointsRegular AreVerticalSnapPointsRegular AreVerticalSnapPointsRegular
Gets a value that indicates whether the vertical snap points for the ItemsPresenter are equidistant from each other.
public : PlatForm::Boolean AreVerticalSnapPointsRegular { get; }public bool AreVerticalSnapPointsRegular { get; }Public ReadOnly Property AreVerticalSnapPointsRegular As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
True if the vertical snap points for the ItemsPresenter are equidistant from each other; otherwise, false.
Footer Footer Footer Footer
Gets or sets the content for the items footer.
public : PlatForm::Object Footer { get; set; }public object Footer { get; set; }Public ReadWrite Property Footer As object// This API is not available in Javascript.
<ItemsPresenter Footer="footerString"/>
- Value
- PlatForm::Object object object object
The content of the items footer. The default is null.
Remarks
You can set a data template for the Footer by using the FooterTemplate property.
- See Also
FooterProperty FooterProperty FooterProperty FooterProperty
Identifies the Footer dependency property.
public : static DependencyProperty FooterProperty { get; }public static DependencyProperty FooterProperty { get; }Public Static ReadOnly Property FooterProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the Footer dependency property.
FooterTemplate FooterTemplate FooterTemplate FooterTemplate
Gets or sets the DataTemplate used to display the content of the items header.
public : DataTemplate FooterTemplate { get; set; }public DataTemplate FooterTemplate { get; set; }Public ReadWrite Property FooterTemplate As DataTemplate// This API is not available in Javascript.
<ItemsPresenter>
<ItemsPresenter.FooterTemplate>
singleDataTemplate
</ItemsPresenter.FooterTemplate>
</ItemsPresenter>
The template that specifies the visualization of the header object. The default is null.
FooterTemplateProperty FooterTemplateProperty FooterTemplateProperty FooterTemplateProperty
Identifies the FooterTemplate dependency property.
public : static DependencyProperty FooterTemplateProperty { get; }public static DependencyProperty FooterTemplateProperty { get; }Public Static ReadOnly Property FooterTemplateProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the FooterTemplate dependency property.
FooterTransitions FooterTransitions FooterTransitions FooterTransitions
Gets or sets the collection of Transition style elements that apply to the footer of an ItemsPresenter.
public : TransitionCollection FooterTransitions { get; set; }public TransitionCollection FooterTransitions { get; set; }Public ReadWrite Property FooterTransitions As TransitionCollection// This API is not available in Javascript.
<ItemsPresenter>
<ItemsPresenter.FooterTransitions>
<TransitionCollection>
oneOrMoreTransitions
</TransitionCollection>
</ItemsPresenter.FooterTransitions>
</ItemsPresenter>
The collection of Transition style elements that apply to the footer of an ItemsPresenter.
Remarks
Important
The XAML syntax for all properties that use a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but properties that use TransitionCollection don't support the implicit collection usage. For more info on implicit collections and XAML, see XAML syntax guide.
Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.
- See Also
FooterTransitionsProperty FooterTransitionsProperty FooterTransitionsProperty FooterTransitionsProperty
Identifies the FooterTransitions dependency property.
public : static DependencyProperty FooterTransitionsProperty { get; }public static DependencyProperty FooterTransitionsProperty { get; }Public Static ReadOnly Property FooterTransitionsProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the FooterTransitions dependency property.
Header Header Header Header
Gets or sets the content for the items header.
public : PlatForm::Object Header { get; set; }public object Header { get; set; }Public ReadWrite Property Header As object// This API is not available in Javascript.
<ItemsPresenter Header="headerString"/>
- Value
- PlatForm::Object object object object
The content of the items header. The default value is null.
Remarks
You can set a data template for the Header by using the HeaderTemplate property.
Windows 8.1 Header alignment is handled differently in apps compiled for Windows 8 than in apps compiled for Windows 8.1.+ In an app compiled for Windows 8, the header is always left-aligned when the orientation of the items is Horizontal, or top-aligned when the orientation is Vertical. VerticalAlignment and HorizontalAlignment values that you set are ignored.
- In an app compiled for Windows 8.1, you can specify the header alignment. VerticalAlignment and HorizontalAlignment values that you set are not ignored.
HeaderProperty HeaderProperty HeaderProperty HeaderProperty
Identifies the Header dependency property.
public : static DependencyProperty HeaderProperty { get; }public static DependencyProperty HeaderProperty { get; }Public Static ReadOnly Property HeaderProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the Header dependency property.
HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate
Gets or sets the DataTemplate used to display the content of the items header.
public : DataTemplate HeaderTemplate { get; set; }public DataTemplate HeaderTemplate { get; set; }Public ReadWrite Property HeaderTemplate As DataTemplate// This API is not available in Javascript.
<ItemsPresenter>
<ItemsPresenter.HeaderTemplate>
singleDataTemplate
</ItemsPresenter.HeaderTemplate>
</ItemsPresenter>
The template that specifies the visualization of the header object. The default is null.
Remarks
Windows 8.1 Header alignment is handled differently in apps compiled for Windows 8 than in apps compiled for Windows 8.1.+ In an app compiled for Windows 8, the header is always left-aligned when the orientation of the items is Horizontal, or top-aligned when the orientation is Vertical. VerticalAlignment and HorizontalAlignment values that you set are ignored.
- In an app compiled for Windows 8.1, you can specify the header alignment. VerticalAlignment and HorizontalAlignment values that you set are not ignored.
HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
public : static DependencyProperty HeaderTemplateProperty { get; }public static DependencyProperty HeaderTemplateProperty { get; }Public Static ReadOnly Property HeaderTemplateProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the HeaderTemplate dependency property.
HeaderTransitions HeaderTransitions HeaderTransitions HeaderTransitions
Gets or sets the collection of Transition style elements that apply to the header of an ItemsPresenter.
public : TransitionCollection HeaderTransitions { get; set; }public TransitionCollection HeaderTransitions { get; set; }Public ReadWrite Property HeaderTransitions As TransitionCollection// This API is not available in Javascript.
<ItemsPresenter>
<ItemsPresenter.HeaderTransitions>
<TransitionCollection>
oneOrMoreTransitions
</TransitionCollection>
</ItemsPresenter.HeaderTransitions>
</ItemsPresenter>
The collection of Transition style elements that apply to the header of an ItemsPresenter.
Remarks
Important
The XAML syntax for all properties that use a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but properties that use TransitionCollection don't support the implicit collection usage. For more info on implicit collections and XAML, see XAML syntax guide.
Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.
- See Also
HeaderTransitionsProperty HeaderTransitionsProperty HeaderTransitionsProperty HeaderTransitionsProperty
Identifies the HeaderTransitions dependency property.
public : static DependencyProperty HeaderTransitionsProperty { get; }public static DependencyProperty HeaderTransitionsProperty { get; }Public Static ReadOnly Property HeaderTransitionsProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the HeaderTransitions dependency property.
Padding Padding Padding Padding
Gets or sets the distance between the ItemsPresenter and its child objects.
public : Thickness Padding { get; set; }public Thickness Padding { get; set; }Public ReadWrite Property Padding As Thickness// This API is not available in Javascript.
The dimensions of the space between the presenter and its children as a Thickness value. Thickness is a structure that stores dimension values using pixel measures.
Remarks
A Padding value applies to presentation rendering of each presented item and also to the header (if one is specified).
A related property is Margin (a property of FrameworkElement ). For ItemsPresenter , margin and padding would typically blend together with the division between them not being apparent in the rendering. So it's typical to specify a Margin or a Padding, but not both. For more info about the relationship between margin and padding, see Alignment, margin, and padding or Define layouts with XAML.
- See Also
PaddingProperty PaddingProperty PaddingProperty PaddingProperty
Identifies the Padding dependency property.
public : static DependencyProperty PaddingProperty { get; }public static DependencyProperty PaddingProperty { get; }Public Static ReadOnly Property PaddingProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the Padding dependency property.
Methods
GetIrregularSnapPoints(Orientation, SnapPointsAlignment) GetIrregularSnapPoints(Orientation, SnapPointsAlignment) GetIrregularSnapPoints(Orientation, SnapPointsAlignment) GetIrregularSnapPoints(Orientation, SnapPointsAlignment)
Returns a read-only collection of numbers that represent the snap points for the specified orientation.
public : IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)public IReadOnlyList<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)Public Function GetIrregularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment) As IReadOnlyList( Of float )// This API is not available in Javascript.
- orientation
- Orientation Orientation Orientation Orientation
The orientation of the requested snap points.
The alignment used by the caller when applying the requested snap points.
A read-only collection of numbers that represent the snap points for the specified orientation, or an empty collection when no snap points are present.
GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single) GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single) GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single) GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single)
Returns an original offset and interval for equidistant snap points for the specified orientation.
public : float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, float offset)public float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)Public Function GetRegularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment, offset As Single) As float// This API is not available in Javascript.
- orientation
- Orientation Orientation Orientation Orientation
The orientation of the requested snap points.
The alignment used by the caller when applying the requested snap points.
- offset
- float Single Single Single
The offset of the first snap point.
The interval between equidistant snap points for the specified orientation or 0 when no snap points are present.
Events
HorizontalSnapPointsChanged HorizontalSnapPointsChanged HorizontalSnapPointsChanged HorizontalSnapPointsChanged
Occurs when the horizontal snap points change.
public : event EventHandler HorizontalSnapPointsChanged<object>public event EventHandler HorizontalSnapPointsChanged<object>Public Event HorizontalSnapPointsChanged<object>// This API is not available in Javascript.
<ItemsPresenter HorizontalSnapPointsChanged="eventhandler" />
VerticalSnapPointsChanged VerticalSnapPointsChanged VerticalSnapPointsChanged VerticalSnapPointsChanged
Occurs when the vertical snap points change.
public : event EventHandler VerticalSnapPointsChanged<object>public event EventHandler VerticalSnapPointsChanged<object>Public Event VerticalSnapPointsChanged<object>// This API is not available in Javascript.
<ItemsPresenter VerticalSnapPointsChanged="eventhandler" />