using Avalonia.Controls; using AvaloniaApplication4.ViewModels; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AvaloniaApplication4.AdditionalModels { public class GlobalsData : ViewModelBase { /// /// смена вложенных страниц /// UserControl activePage; UserControl mainUserControl; public GlobalsData() { this.activePage = new UserControl(); this.mainUserControl = new UserControl(); } public UserControl GlobalUserControl { get { return activePage; } set { if (activePage == value) return; activePage = value; OnPropertyChanged(nameof(GlobalUserControl)); } } public UserControl GlobalMainUserControl { get { return mainUserControl; } set { if (mainUserControl == value) return; mainUserControl = value; OnPropertyChanged(nameof(GlobalMainUserControl)); } } } }