private void CloseCodeEditor() { YamlEditorController.SetEnabled("YAML Editor is open", true); YamlEditorHeight = new GridLength(100, GridUnitType.Star); CodeEditorController.SetEnabled("Code Editor is open", false); CodeEditorHeight = new GridLength(0, GridUnitType.Star); }
private void DoEditScript() { YamlEditorController.ExpandCodeBlock(); _selectedBlock = YamlHelper.ExtractBlock(YamlEditorController.SelectedText); if (_selectedBlock == null) { return; } BlockFormat = "(unchanged)"; YamlEditorController.SetEnabled("YAML Editor is open", false); YamlEditorHeight = new GridLength(50); CodeEditorHeight = new GridLength(100, GridUnitType.Star); CodeEditorController.Text = _selectedBlock.Content; CodeEditorController.SetEnabled("Code Editor is open", true); Dispatcher.BeginInvoke(DispatcherPriority.Background, () => YamlEditorController.Data.ScrollToLine(YamlEditorController.Data.TextArea.Caret.Line)); }