wabbajack/Wabbajack.App/Screens/LauncherView.axaml.cs
2021-09-30 16:18:58 -06:00

33 lines
1.0 KiB
C#

using System.Reactive.Disposables;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using ReactiveUI;
using Wabbajack.App.Views;
namespace Wabbajack.App.Screens
{
public partial class LauncherView : ScreenBase<LauncherViewModel>
{
public LauncherView()
{
InitializeComponent();
this.WhenActivated(disposables =>
{
this.OneWayBind(ViewModel, vm => vm.Image, view => view.ModListImage.Source)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.Title, view => view.ModList.Text)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.InstallFolder, view => view.InstallPath.Text,
v => v.ToString())
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.PlayButton, view => view.PlayGame.Button)
.DisposeWith(disposables);
});
}
}
}