A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
557 B

using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Interactivity;
namespace IntegrationTestApp.Pages;
public partial class ListBoxPage : UserControl
{
public ListBoxPage()
{
InitializeComponent();
ListBoxItems = Enumerable.Range(0, 100).Select(x => "Item " + x).ToList();
DataContext = this;
}
public List<string> ListBoxItems { get; }
private void ListBoxSelectionClear_Click(object? sender, RoutedEventArgs e)
{
BasicListBox.SelectedIndex = -1;
}
}