wabbajack/Wabbajack.App/Controls/InstalledListView.axaml.cs

35 lines
1.2 KiB
C#
Raw Normal View History

2021-10-22 04:28:52 +00:00
using Avalonia.Controls.Mixins;
using Avalonia.ReactiveUI;
using ReactiveUI;
namespace Wabbajack.App.Controls;
public partial class InstalledListView : ReactiveUserControl<InstalledListViewModel>, IActivatableView
{
public InstalledListView()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
2021-11-08 13:32:51 +00:00
this.OneWayBind(ViewModel, vm => vm.Image, view => view.ListImage.Source)
.DisposeWith(disposables);
2021-10-22 04:28:52 +00:00
this.OneWayBind(ViewModel, vm => vm.Name, view => view.Title.Text)
.DisposeWith(disposables);
2021-10-23 16:51:17 +00:00
2021-11-08 13:32:51 +00:00
this.OneWayBind(ViewModel, vm => vm.Author, view => view.Author.Text)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.Version, view => view.Version.Text)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.InstallPath, view => view.InstallationPath.Text,
2021-10-22 04:28:52 +00:00
p => p.ToString())
.DisposeWith(disposables);
2021-10-23 16:51:17 +00:00
2021-11-08 13:32:51 +00:00
this.BindCommand(ViewModel, vm => vm.Play, view => view.ListButton)
2021-10-22 04:28:52 +00:00
.DisposeWith(disposables);
});
}
}