Skip to content

列表 ​

列表 (ListBox) ​

xml
<ListBox
    Name="ListBox"
    Width="500"
    Height="300"/>
csharp
string[] items = new string[32];
for (int i = 1; i <= 32; i++)
{
    items[i - 1] = $"Item {i}";
}

ListBox.ItemsSource = items;

圆角列表 (RoundedListBox) ​

xml
 <ui:RoundListBox
Name="RoundListBox"
Width="500"
Height="300"/>
csharp
string[] items = new string[32];
for (int i = 1; i <= 32; i++)
{
    items[i - 1] = $"Item {i}";
}

RoundListBox.ItemsSource = items;

基于 MIT 许可发布