wabbajack/Wabbajack.App.Wpf/View Models/Controls/RemovableItemView.xaml.cs
2022-05-24 20:59:15 -06:00

23 lines
581 B
C#

using System.Reactive.Disposables;
using System.Windows.Controls;
using ReactiveUI;
namespace Wabbajack.View_Models.Controls;
public partial class RemovableItemView : ReactiveUserControl<RemovableItemViewModel>
{
public RemovableItemView()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
this.BindStrict(ViewModel, vm => vm.Text, view => view.DisplayText.Text)
.DisposeWith(disposables);
});
DeleteButton.Command = ReactiveCommand.Create(() => ViewModel.RemoveFn());
}
}