public MainWindow() { InitializeComponent(); this.AttachDevTools(); _textEditor = this.FindControl <TextEditor>("Editor"); _textEditor.Background = Brushes.Transparent; _textEditor.ShowLineNumbers = true; //_textEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#"); _textEditor.TextArea.TextEntered += textEditor_TextArea_TextEntered; _textEditor.TextArea.TextEntering += textEditor_TextArea_TextEntering; _textEditor.TextArea.IndentationStrategy = new Indentation.CSharp.CSharpIndentationStrategy(); _addControlBtn = this.FindControl <Button>("addControlBtn"); _addControlBtn.Click += _addControlBtn_Click; _clearControlBtn = this.FindControl <Button>("clearControlBtn"); _clearControlBtn.Click += _clearControlBtn_Click;; _textEditor.TextArea.TextView.ElementGenerators.Add(_generator); impl = PlatformManager.CreateWindow().CreatePopup(); this.AddHandler(PointerWheelChangedEvent, (o, i) => { if (i.KeyModifiers != KeyModifiers.Control) { return; } if (i.Delta.Y > 0) { _textEditor.FontSize++; } else { _textEditor.FontSize = _textEditor.FontSize > 1 ? _textEditor.FontSize - 1 : 1; } }, RoutingStrategies.Bubble, true); }
public MainWindow() { InitializeComponent(); this.AttachDevTools(); _textEditor = this.FindControl <TextEditor>("Editor"); _textEditor.Background = Brushes.Transparent; _textEditor.ShowLineNumbers = true; //_textEditor.SyntaxHighlighting = HighlightingManager.Instance.GetDefinition("C#"); _textEditor.TextArea.TextEntered += textEditor_TextArea_TextEntered; _textEditor.TextArea.TextEntering += textEditor_TextArea_TextEntering; _textEditor.TextArea.IndentationStrategy = new Indentation.CSharp.CSharpIndentationStrategy(); _addControlBtn = this.FindControl <Button>("addControlBtn"); _addControlBtn.Click += _addControlBtn_Click; _clearControlBtn = this.FindControl <Button>("clearControlBtn"); _clearControlBtn.Click += _clearControlBtn_Click;; _textEditor.TextArea.TextView.ElementGenerators.Add(_generator); impl = PlatformManager.CreateWindow().CreatePopup(); }
/// <summary> /// Initializes a new instance of the <see cref="Window"/> class. /// </summary> public Window() : this(PlatformManager.CreateWindow()) { }
/// <summary> /// Initializes a new instance of the <see cref="Window"/> class. /// </summary> public Window() : base(PlatformManager.CreateWindow()) { _maxPlatformClientSize = this.PlatformImpl.MaxClientSize; }
/// <summary> /// Creates a new InsightWindow. /// </summary> public InsightWindow(TextArea textArea) : base(textArea, PlatformManager.CreateWindow().CreatePopup()) { CloseAutomatically = true; AttachEvents(); Initialize(); }