Esempio n. 1
0
 public AllDiary()
 {
     InitializeComponent();
     _allDiaryModel            = new allDiaryModel();
     this.dataGrid.DataContext = _allDiaryModel.mylist;
     //           Console.WriteLine("界面mylist");
     //          Console.WriteLine(_allDiaryModel.mylist.Count);
 }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();
            _allDiaryPage = new page.allDiaryModel();
            this.DataContext = _allDiaryPage;

            //添加页面的Uri地址,采用相对路径,根路径是项目名,实现allViews的初始化  
            allViews.Add("page1", new Uri("page/AllDiary.xaml", UriKind.Relative));
            allViews.Add("page2", new Uri("page/AddDiary.xaml", UriKind.Relative));

       //     mainFrame.Navigate(allViews["page1"]);
        }