SPT-AKI-Installer/SPTInstaller/CustomControls/PreCheckDetails.axaml.cs
waffle.lord 0c82c4335f trying something WIP
trying to see if I can just get the selected index and bind to it... doesn't seem to be working though ...
2024-03-25 16:12:15 -04:00

32 lines
943 B
C#

using System.Collections.ObjectModel;
using Avalonia;
using Avalonia.Controls;
using SPTInstaller.Models;
namespace SPTInstaller.CustomControls;
public partial class PreCheckDetails : UserControl
{
public PreCheckDetails()
{
InitializeComponent();
}
public static readonly StyledProperty<ObservableCollection<PreCheckBase>> PreChecksProperty =
AvaloniaProperty.Register<PreCheckDetails, ObservableCollection<PreCheckBase>>(nameof(PreChecks));
public ObservableCollection<PreCheckBase> PreChecks
{
get => GetValue(PreChecksProperty);
set => SetValue(PreChecksProperty, value);
}
public static readonly StyledProperty<int> SelectedIndexProperty =
AvaloniaProperty.Register<PreCheckDetails, int>(nameof(SelectedIndex));
public int SelectedIndex
{
get => GetValue(SelectedIndexProperty);
set => SetValue(SelectedIndexProperty, value);
}
}