DevExpress에서 제공하는 ListBoxEdit 컨트롤의 Orientation을 Horizontal로 설정하는 방법을 알아보자.
ListBoxEdit 네임스페이스 선언
ListBoxEdit 컨트롤을 사용하기 위해 다음과 같이 네임스페이스를 선언해줘야 한다.
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
ListBoxEdit 디폴트 Orientation
ListBoxEdit 컨트롤은 Orientation이 디폴트로 Vertical이다.
<dx:ThemedWindow x:Class="ListBoxEditOrientation.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="150" Width="200">
<StackPanel>
<dxe:ListBoxEdit>
<dxe:ListBoxEditItem Content="A"/>
<dxe:ListBoxEditItem Content="B"/>
<dxe:ListBoxEditItem Content="C"/>
</dxe:ListBoxEdit>
</StackPanel>
</dx:ThemedWindow>
- 실행결과
ListBoxEdit Orientation 설정
ListBoxEdit의 Orientation을 설정하기 위해 ItemsPanel 속성 값을 설정해줘야 한다.
<dx:ThemedWindow x:Class="ListBoxEditOrientation.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="150" Width="200">
<StackPanel>
<dxe:ListBoxEdit>
<dxe:ListBoxEdit.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</dxe:ListBoxEdit.ItemsPanel>
<dxe:ListBoxEditItem Content="A"/>
<dxe:ListBoxEditItem Content="B"/>
<dxe:ListBoxEditItem Content="C"/>
</dxe:ListBoxEdit>
</StackPanel>
</dx:ThemedWindow>
- 실행결과
'WPF > DevExpress' 카테고리의 다른 글
DevExpress HamburgerMenu 뒤로가기 버튼 없애는 방법 (0) | 2024.03.23 |
---|---|
DevExpress GridColumn CheckBox 전체 선택 및 해제하는 방법 (0) | 2024.03.22 |
Devexpress TextEdit Enter 눌렀을 때 바인딩 소스 업데이트하는 방법 (0) | 2024.01.31 |
DevExpress TextEdit Mask IP 정규식 패턴 (0) | 2024.01.10 |
DevExpress GridColumn DateTime Format 설정 (1) | 2024.01.09 |