コード例 #1
0
 public MainPageViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         Enumerable.Range(1, 10).ForEach(x => Items.Add(DataService.Sample(x)));
     }
     else
     {
         _dataService = new DataService();
     }
 }
コード例 #2
0
 public ArticlePageViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         Article = DataService.Sample();
     }
     else
     {
         _dataService = new DataService();
     }
 }