//============================================================================= private async void PlaceSheetButton_Click(object sender, RoutedEventArgs e) { // WarehouseSheet warehouseSheet = _Get_CurrentSheet() as WarehouseSheet; if (warehouseSheet == null) { return; } if (warehouseSheet.Document == null) { return; } PlaceSheetDialogVM dialogVM = new PlaceSheetDialogVM(warehouseSheet.Document); PlaceSheetDialog psDialog = new PlaceSheetDialog(dialogVM); // true - OK // false - CANCEL var result = await DialogHost.Show(psDialog); if (result is bool && (bool)result) { if (dialogVM.SelectedSheetPreview == null) { return; } warehouseSheet.CreateSheetGeometry(dialogVM.SelectedSheetPreview.Sheet); } }
public PlaceSheetDialog(PlaceSheetDialogVM vm) { InitializeComponent(); m_VM = vm; this.DataContext = m_VM; if (CurrentTheme.CurrentColorTheme != null) { CurrentTheme.CurrentColorTheme.ApplyTheme(this.Resources); } }