Esempio n. 1
0
        protected override void OnTemplateApplied(TemplateAppliedEventArgs e)
        {
            base.OnTemplateApplied(e);

            _toolTip = e.NameScope.Find <CodeEditorToolTip>("PART_Tooltip");
            _toolTip.AttachEditor(this);

            _renameControl = e.NameScope.Find <RenameControl>("PART_RenameControl");
            _renameControl.PlacementTarget = TextArea;

            _intellisenseControl        = e.NameScope.Find <Intellisense>("PART_Intellisense");
            _completionAssistantControl = e.NameScope.Find <CompletionAssistantView>("PART_CompletionAssistant");

            _intellisenseControl.SetSignatureHelper(_completionAssistantControl);

            _intellisenseControl.PlacementTarget = TextArea;
            _intellisenseControl.DataContext     = Intellisense;

            _completionAssistantControl.PlacementTarget = TextArea;
            _completionAssistantControl.DataContext     = _completionAssistant;

            _isLoaded = true;

            TextArea.SelectionChanged += TextArea_SelectionChanged;

            Dispatcher.UIThread.Post(() =>
            {
                Focus();
                TextArea.Caret.BringCaretToView();
            });
        }
Esempio n. 2
0
        protected override void OnTemplateApplied(TemplateAppliedEventArgs e)
        {
            base.OnTemplateApplied(e);

            _toolTip = e.NameScope.Find <CodeEditorToolTip>("PART_Tooltip");
            _toolTip.AttachEditor(this);

            _intellisenseControl        = e.NameScope.Find <Intellisense>("PART_Intellisense");
            _completionAssistantControl = e.NameScope.Find <CompletionAssistantView>("PART_CompletionAssistant");

            _intellisenseControl.SetSignatureHelper(_completionAssistantControl);

            _intellisenseControl.PlacementTarget = TextArea;
            _intellisenseControl.DataContext     = _intellisense;

            _completionAssistantControl.PlacementTarget = TextArea;
            _completionAssistantControl.DataContext     = _completionAssistant;
        }