mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-03-25 10:21:11 -04:00
Make fields readonly Remove unnecessary casts Format document Remove unnecessary usings Sort usings Use file-level namespaces Order modifiers
27 lines
810 B
C#
27 lines
810 B
C#
using Avalonia;
|
|
using Avalonia.Collections;
|
|
using Avalonia.Controls;
|
|
using LibationAvalonia.ViewModels;
|
|
using ReactiveUI;
|
|
|
|
namespace LibationAvalonia.Controls;
|
|
|
|
public partial class CheckedListBox : UserControl
|
|
{
|
|
public static readonly StyledProperty<AvaloniaList<CheckBoxViewModel>> ItemsProperty =
|
|
AvaloniaProperty.Register<CheckedListBox, AvaloniaList<CheckBoxViewModel>>(nameof(Items));
|
|
|
|
public AvaloniaList<CheckBoxViewModel> Items { get => GetValue(ItemsProperty); set => SetValue(ItemsProperty, value); }
|
|
|
|
public CheckedListBox()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
}
|
|
|
|
public class CheckBoxViewModel : ViewModelBase
|
|
{
|
|
public bool IsChecked { get => field; set => this.RaiseAndSetIfChanged(ref field, value); }
|
|
public object? Item { get => field; set => this.RaiseAndSetIfChanged(ref field, value); }
|
|
}
|