feat: selected item is now two-way binding by default.

This commit is contained in:
rabbitism
2024-04-17 20:35:35 +08:00
parent 2c471aa3f6
commit 50be089b4e
5 changed files with 73 additions and 27 deletions

View File

@@ -3,8 +3,9 @@ using CommunityToolkit.Mvvm.ComponentModel;
namespace Ursa.Demo.ViewModels;
public class TreeComboBoxDemoViewModel: ObservableObject
public partial class TreeComboBoxDemoViewModel: ObservableObject
{
[ObservableProperty] private TreeComboBoxItemViewModel? _selectedItem;
public List<TreeComboBoxItemViewModel> Items { get; set; }
public TreeComboBoxDemoViewModel()