private bool CanEditDesignApplicationExecute(object arg) { if (ApplicationSource.Where(item => item.IsChecked).ToList().Count == 1) { return(true); } return(false); }
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(); }