Пример #1
0
 private void PersonalPage_Loaded(object sender, RoutedEventArgs e)
 {
     if (!viewModel.IsDataLoaded)
     {
         viewModel.LoadData();
     }
 }
Пример #2
0
        public PersonalPage()
        {
            this.InitializeComponent();
            viewModel = new PersonalViewModel();
            if (!viewModel.IsDataLoaded)
            {
                viewModel.LoadData();
            }

            DataContext  = viewModel;
            this.Loaded += new RoutedEventHandler(PersonalPage_Loaded);
        }