2024-03-24 21:00:20 +08:00
|
|
|
using System.Collections.ObjectModel;
|
2023-01-04 17:24:39 +08:00
|
|
|
using Avalonia.Controls;
|
2024-03-24 21:00:20 +08:00
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
2023-01-04 17:24:39 +08:00
|
|
|
|
|
|
|
namespace Semi.Avalonia.Demo.Pages;
|
|
|
|
|
|
|
|
public partial class ComboBoxDemo : UserControl
|
|
|
|
{
|
|
|
|
public ComboBoxDemo()
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
2024-03-24 21:00:20 +08:00
|
|
|
this.DataContext = new ComboBoxDemoViewModel();
|
2023-01-04 17:24:39 +08:00
|
|
|
}
|
2024-03-24 21:00:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public class ComboBoxDemoViewModel : ObservableObject
|
|
|
|
{
|
|
|
|
public ObservableCollection<string> Items { get; set; } = ["Ding", "Otter", "Husky", "Mr.17", "Cass"];
|
2023-01-04 17:24:39 +08:00
|
|
|
}
|