public static StackPanel Create(Dispatcher d, Action <OptimizationType> onOptimizationChosen) { var title = TextBlockCreator.TitleTextBlock("Method"); var chooseOptimizationRadioButtonChooser = RadioButtonChooser.Create(d, OptimizationTypeUtils.All, OptimizationTypeUtils.AsString, onOptimizationChosen); return(GuiExtensions.CreateStackPanel(title, chooseOptimizationRadioButtonChooser)); }
private UIElement ShowVisual() { var chooser = RadioButtonChooser.Create(Dispatcher, new[] { true, false }, b => b.ToString(), OnVisualChanged); chooser.Orientation = Orientation.Horizontal; var text = TextBlockCreator.RegularTextBlock("Show Visual:").WithBullet(); var stackPanel = GuiExtensions.CreateStackPanel(text, chooser); stackPanel.Orientation = Orientation.Horizontal; (chooser.Children[0] as RadioButton).IsChecked = true; return(stackPanel); }