public ActiveViewTracker(IWpfTextView view) { _ActiveTextView = _View = view; ActiveTextViewChanged?.Invoke(view, new TextViewCreatedEventArgs(view)); view.Closed += TextViewClosed_UnhookEvent; view.VisualElement.MouseEnter += TextViewMouseEnter_SetActiveView; view.GotAggregateFocus += TextViewGotFocus_SetActiveView; }
void TextViewGotFocus_SetActiveView(object sender, EventArgs e) { _ActiveTextView = _View; ActiveTextViewChanged?.Invoke(_View, new TextViewCreatedEventArgs(_View)); }