Ejemplo n.º 1
0
        public MainWindowViewModel()
        {
            MainTabItems.Add(new MainWindowModel()
            {
                Header = "TimeManager", ContentPage = new MainPage(), Width = 500, Height = 620, ResizeMode = ResizeMode.NoResize
            });
            MainTabItems.Add(new MainWindowModel()
            {
                Header = "TimeChart", ContentPage = new ChartPage(), Width = 1000, Height = 700
            });
            MainTabItems.Add(new MainWindowModel()
            {
                Header = "Tasks", ContentPage = new TaskPage(), Width = 1000, Height = 700
            });                                                                                                                     // TaskVM
            MainTabItems[0].IsChecked = false;
            CurPageView = MainTabItems[0].ContentPage;
            MainTabItems[2].ContentPage.DataContext = TaskVM; // !!!!!!!!!!!!


            Application.Current.MainWindow.Width = MainTabItems[0].Width;  // Зміна розміру вікна
        }
Ejemplo n.º 2
0
 public void CloseTab(UIControlInfo obj)
 {
     MainTabItems.Remove(obj);
 }