wabbajack/Wabbajack.App/Controls/InstalledListView.axaml.cs
2021-10-21 22:28:52 -06:00

28 lines
833 B
C#

using Avalonia.Controls.Mixins;
using Avalonia.ReactiveUI;
using ReactiveUI;
using Wabbajack.App.Utilities;
namespace Wabbajack.App.Controls;
public partial class InstalledListView : ReactiveUserControl<InstalledListViewModel>, IActivatableView
{
public InstalledListView()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
this.OneWayBind(ViewModel, vm => vm.Name, view => view.Title.Text)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.InstallPath, view => view.Title.Text,
p => p.ToString())
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.Play, view => view.PlayButton)
.DisposeWith(disposables);
});
}
}