2024-07-23 07:40:10 +00:00
|
|
|
using Avalonia.Controls;
|
2024-09-13 19:09:33 +00:00
|
|
|
using Avalonia.ReactiveUI;
|
2024-07-23 07:40:10 +00:00
|
|
|
using System.Diagnostics;
|
|
|
|
using System;
|
2024-09-13 19:09:33 +00:00
|
|
|
using StarsAssistant.ViewModels;
|
|
|
|
using Avalonia.Markup.Xaml;
|
2024-09-14 16:47:59 +00:00
|
|
|
using ReactiveUI;
|
|
|
|
using System.Reactive.Disposables;
|
2024-07-23 07:40:10 +00:00
|
|
|
|
2024-08-15 19:46:43 +00:00
|
|
|
namespace StarsAssistant.Views;
|
2024-07-23 07:40:10 +00:00
|
|
|
|
2024-09-13 19:09:33 +00:00
|
|
|
public partial class MainWindow : ReactiveWindow<MainWindowViewModel>
|
2024-07-23 07:40:10 +00:00
|
|
|
{
|
|
|
|
public MainWindow()
|
|
|
|
{
|
2024-09-14 16:47:59 +00:00
|
|
|
this.WhenActivated(
|
|
|
|
|
|
|
|
disposables => {
|
|
|
|
this.OneWayBind(ViewModel,
|
|
|
|
viewModel => viewModel.Planets,
|
|
|
|
view => view.PlanetsGrid.ItemsSource)
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
this.OneWayBind(ViewModel,
|
|
|
|
vm => vm.WelcomeMessage,
|
|
|
|
v => v.WelcomeText.Text)
|
|
|
|
.DisposeWith(disposables);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
InitializeComponent();
|
2024-07-23 07:40:10 +00:00
|
|
|
}
|
2024-09-14 16:47:59 +00:00
|
|
|
|
2024-07-23 07:40:10 +00:00
|
|
|
}
|