wabbajack/Wabbajack.App/Controls/RemovableListItem.axaml.cs
2021-10-23 10:51:17 -06:00

21 lines
613 B
C#

using Avalonia.Controls.Mixins;
using Avalonia.ReactiveUI;
using ReactiveUI;
namespace Wabbajack.App.Controls;
public partial class RemovableListItem : ReactiveUserControl<RemovableItemViewModel>, IActivatableView
{
public RemovableListItem()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
this.OneWayBind(ViewModel, vm => vm.Text, view => view.Text.Text)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.DeleteCommand, view => view.DeleteButton)
.DisposeWith(disposables);
});
}
}