سلام بر تمامی برنامه نویسان #C 😉 در این پست آموزش ListBox با Items Panel با wpf و سی شارپ #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
تصویر خروجی این کد:
کد ListBox با Items Panel با wpf و سی شارپ #C :
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ListBox HorizontalAlignment="Center" VerticalAlignment="Center">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBoxItem>Whatever Item 1</ListBoxItem>
<ListBoxItem>Whatever Item 2</ListBoxItem>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ListBox HorizontalAlignment="Center" VerticalAlignment="Center">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBoxItem>Whatever Item 1</ListBoxItem>
<ListBoxItem>Whatever Item 2</ListBoxItem>