Пример #1
0
 public MainPage()
 {
     InitializeComponent();
     _viewModel = Kernel_MainViewModel.Get();
     DataContext = _viewModel;
 }
 internal static MainViewModel Get()
 {
     if(_MainViewModel != null) return _MainViewModel;
     var x = new MainViewModel(
     );
     _MainViewModel = x;
     x.DataService = Kernel_DataService.Get();
     x.Sharing = Kernel_Sharing.Get();
     return _MainViewModel;
 }
 internal static void Rebind(MainViewModel value)
 {
     _MainViewModel = value;
 }
 internal static void Clear()
 {
     _MainViewModel = null;
 }