wabbajack/Wabbajack.App/Screens/BrowseView.axaml.cs
Timothy Baldridge 47e01dcc34 More styling
2021-11-04 07:01:48 -06:00

39 lines
1.4 KiB
C#

using System.Reactive.Disposables;
using ReactiveUI;
using Wabbajack.App.Views;
namespace Wabbajack.App.Screens;
public partial class BrowseView : ScreenBase<BrowseViewModel>
{
public BrowseView() : base("Web Browser")
{
InitializeComponent();
this.WhenActivated(disposables =>
{
this.OneWayBind(ViewModel, vm => vm.ModLists, view => view.GalleryList.Items)
.DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SearchText, view => view.SearchBox.Text)
.DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.GamesList, view => view.GamesList.Items)
.DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedGame, view => view.GamesList.SelectedItem)
.DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.ResetFiltersCommand, view => view.ClearFiltersButton)
.DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.OnlyInstalledGames, view => view.OnlyInstalledCheckbox.IsChecked)
.DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.OnlyUtilityLists, view => view.ShowUtilityLists.IsChecked)
.DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.ShowNSFW, view => view.ShowNSFW.IsChecked)
.DisposeWith(disposables);
});
}
}