private void CheckBox_Click_1(object sender, RoutedEventArgs e) { bool isPublic = false; IViewModel viewModel = DataContext as IViewModel; if (viewModel != null) { isPublic = (sender as CheckBox).IsChecked == true; viewModel.EditLocalAsset((grdAssets.SelectedItem as asset).Value, isPublic, ""); } }
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { string assetType = ""; if (e.RemovedItems.Count != 0) { if (grdAssets.SelectedItems.Count != 0) { IViewModel viewModel = DataContext as IViewModel; if (viewModel != null) { assetType = (sender as ComboBox).SelectedValue.ToString(); viewModel.EditLocalAsset((grdAssets.SelectedItem as asset).Value, null, assetType); } } } }