コード例 #1
0
 private bool CanEditDesignApplicationExecute(object arg)
 {
     if (ApplicationSource.Where(item => item.IsChecked).ToList().Count == 1)
     {
         return(true);
     }
     return(false);
 }
コード例 #2
0
        public void EditDesignApplication(object parameter)
        {
            DesignApplicationView designApplicationView = new DesignApplicationView();

            designApplicationView.ViewModel.DesignApplication = ApplicationSource.Where(item => item.IsChecked == true).First();
            designApplicationView.Title = "编辑应用程序";
            designApplicationView.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            designApplicationView.ViewModel.EditState   = "modify";
            designApplicationView.ShowDialog();
        }