private void NewItemOnClicked(object sender, EventArgs eventArgs) { var dlg = new NewProjectWizard(); dlg.Closed += (s, a) => { if (!dlg.Result) { return; } var rootType = "Grid"; if (dlg._radioButtonHorizontalStackPanel.IsPressed) { rootType = "HorizontalStackPanel"; } else if (dlg._radioButtonVerticalStackPanel.IsPressed) { rootType = "VerticalStackPanel"; } else if (dlg._radioButtonPanel.IsPressed) { rootType = "Panel"; } else if (dlg._radioButtonScrollViewer.IsPressed) { rootType = "ScrollViewer"; } else if (dlg._radioButtonHorizontalSplitPane.IsPressed) { rootType = "HorizontalSplitPane"; } else if (dlg._radioButtonVerticalSplitPane.IsPressed) { rootType = "VerticalSplitPane"; } else if (dlg._radioButtonWindow.IsPressed) { rootType = "Window"; } else if (dlg._radioButtonDialog.IsPressed) { rootType = "Dialog"; } New(rootType); }; dlg.ShowModal(_desktop); }
private void NewItemOnClicked(object sender, EventArgs eventArgs) { var dlg = new NewProjectWizard(); dlg.Closed += (s, a) => { if (!dlg.Result) { return; } Container rootWidget = null; if (dlg._radioButtonGrid.IsPressed) { rootWidget = new Grid(); } else if (dlg._radioButtonPanel.IsPressed) { rootWidget = new Panel(); } else if (dlg._radioButtonScrollPane.IsPressed) { rootWidget = new ScrollPane(); } else if (dlg._radioButtonHorizontalSplitPane.IsPressed) { rootWidget = new HorizontalSplitPane(); } else if (dlg._radioButtonVerticalSplitPane.IsPressed) { rootWidget = new VerticalSplitPane(); } else if (dlg._radioButtonWindow.IsPressed) { rootWidget = new Window(); } else if (dlg._radioButtonDialog.IsPressed) { rootWidget = new Dialog(); } New(rootWidget); }; dlg.ShowModal(_desktop); }