private void CreateControl() { control = new Views.CodeWindow(); viewModel = new ViewModels.CodeWindowViewModel(); control.CodeOutputSettingsPropertyChanged += (not, used) => HandleCodeOutputPropertyChanged(); control.GenerateCodeClicked += (not, used) => HandleGenerateCodeButtonClicked(); viewModel.PropertyChanged += (not, used) => RefreshCodeDisplay(); control.DataContext = viewModel; GumCommands.Self.GuiCommands.AddControl(control, "Code", TabLocation.Right); }
private void CreateControl() { control = new Views.CodeWindow(); viewModel = new ViewModels.CodeWindowViewModel(); control.CodeOutputSettingsPropertyChanged += (not, used) => HandleCodeOutputPropertyChanged(); control.GenerateCodeClicked += (not, used) => HandleGenerateCodeButtonClicked(); viewModel.PropertyChanged += (not, used) => RefreshCodeDisplay(); control.DataContext = viewModel; // We don't actually want it to show, just associate, so add and immediately remove. // Eventually we want this to be done with a single call but I don't know if there's Gum // support for it yet GumCommands.Self.GuiCommands.AddControl(control, "Code", TabLocation.RightBottom); }