using YtYtAvalonia.Models; using YtYtAvalonia.Views; using YtYtAvalonia.ViewModels; using Avalonia.Controls; using ReactiveUI; using YtYtAvalonia.View; namespace YtYtAvalonia.ViewModels { public class MainWindowViewModel : ViewModelBase { #pragma warning disable CA1822 // Mark members as static public static SuharevaContext myConnection = new SuharevaContext(); RegistrationViewModel regPage = new RegistrationViewModel(myConnection); public RegistrationViewModel RegPage { get => regPage; set => regPage = value; } #pragma warning restore CA1822 // Mark members as static public string Greeting => "Welcome to Avalonia!"; public UserControl UC { get => uc; set => this.RaiseAndSetIfChanged(ref uc, value); } #pragma warning restore CA1822 // Mark members as static private UserControl uc = new LoginView(); public void LoadRegistrationView() => UC = new RegistrationView(); } }