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 许可发布