Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ListBoxEdit.ItemsPanel Property

Gets or sets the template that defines the presentation of a container panel used by the editor to arrange its items. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public ItemsPanelTemplate ItemsPanel { get; set; }

#Property Value

Type Description
ItemsPanelTemplate

A ItemsPanelTemplate object that arranges items.

#Remarks

The following code sample specifies the maximum width of list box items:

<dxe:ListBoxEdit>
    <dxe:ListBoxEdit.ItemsPanel>
        <ItemsPanelTemplate>
            <WrapPanel MaxWidth="125" Orientation="Vertical" />
        </ItemsPanelTemplate>
    </dxe:ListBoxEdit.ItemsPanel>
    <dxe:ListBoxEditItem>The quick brown fox jumps over the lazy dog.</dxe:ListBoxEditItem>
    <dxe:ListBoxEditItem>Item 2</dxe:ListBoxEditItem>
    <dxe:ListBoxEditItem>Item 3</dxe:ListBoxEditItem>
</dxe:ListBoxEdit>

WPF ListBoxEdit - ItemsPanel Property

By default, the layout of items is defined by the DevExpress.Xpf.Core.DXVirtualizingStackPanel control with the enabled virtualization. In this instance, vertical scrolling is performed item by item. To activate per-pixel scrolling, do the following:

<dxe:ListBoxEdit Name="lbEdit1"
                    Width="150" Height="100"
                    ScrollViewer.CanContentScroll="False"/>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemsPanel property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also