2 writes to _activeWpfTextView
Microsoft.VisualStudio.RazorExtension (2)
SyntaxVisualizer\SyntaxVisualizerControl.xaml.cs (2)
330
_activeWpfTextView
= wpfTextView;
369
_activeWpfTextView
= null;
40 references to _activeWpfTextView
Microsoft.VisualStudio.RazorExtension (40)
SyntaxVisualizer\SyntaxVisualizerControl.xaml.cs (40)
118
if (
_activeWpfTextView
is null)
125
if (_fileUriProvider.TryGet(
_activeWpfTextView
.TextBuffer, out var hostDocumentUri))
127
ShowGeneratedCode(
_activeWpfTextView
.TextBuffer, hostDocumentUri, GeneratedDocumentKind.Formatting);
133
if (
_activeWpfTextView
is null)
140
if (_fileUriProvider.TryGet(
_activeWpfTextView
.TextBuffer, out var hostDocumentUri))
142
ShowGeneratedCode(
_activeWpfTextView
.TextBuffer, hostDocumentUri, GeneratedDocumentKind.CSharp);
178
if (
_activeWpfTextView
is null)
183
OpenVirtualDocuments<HtmlVirtualDocumentSnapshot>(
_activeWpfTextView
.TextBuffer);
253
if (
_activeWpfTextView
is not null &&
254
_fileUriProvider.TryGet(
_activeWpfTextView
.TextBuffer, out var hostDocumentUri))
291
if (
_activeWpfTextView
!= null && !
_activeWpfTextView
.Properties.ContainsProperty("BackupOpacity"))
293
var selectionLayer =
_activeWpfTextView
.GetAdornmentLayer(PredefinedAdornmentLayers.Selection);
296
_activeWpfTextView
.Properties.AddProperty("BackupOpacity", selectionLayer.Opacity);
307
if (
_activeWpfTextView
!= null &&
_activeWpfTextView
.Properties.ContainsProperty("BackupOpacity"))
309
var selectionLayer =
_activeWpfTextView
.GetAdornmentLayer(PredefinedAdornmentLayers.Selection);
312
selectionLayer.Opacity = (double)
_activeWpfTextView
.Properties.GetProperty("BackupOpacity");
313
_activeWpfTextView
.Properties.RemoveProperty("BackupOpacity");
327
if (
_activeWpfTextView
!= wpfTextView)
331
_activeWpfTextView
.TextBuffer.Changed += HandleTextBufferChanged;
332
_activeWpfTextView
.Selection.SelectionChanged += HandleSelectionChanged;
351
if (IsVisible &&
_activeWpfTextView
!= null)
354
if (wpfTextView ==
_activeWpfTextView
)
365
if (
_activeWpfTextView
!= null)
367
_activeWpfTextView
.TextBuffer.Changed -= HandleTextBufferChanged;
368
_activeWpfTextView
.Selection.SelectionChanged -= HandleSelectionChanged;
397
if (
_activeWpfTextView
is null)
402
var caret =
_activeWpfTextView
.Selection.StreamSelectionSpan.SnapshotSpan.Span.Start;
452
if (!IsVisible ||
_activeWpfTextView
is null)
459
if (
_activeWpfTextView
is not null &&
460
_fileUriProvider.TryGet(
_activeWpfTextView
.TextBuffer, out var hostDocumentUri))
499
if (IsVisible &&
_activeWpfTextView
!= null)
501
var snapShotSpan = new SnapshotSpan(
_activeWpfTextView
.TextBuffer.CurrentSnapshot, node.SpanStart, node.SpanLength);
503
_activeWpfTextView
.Selection.Select(snapShotSpan, false);
504
_activeWpfTextView
.ViewScroller.EnsureSpanVisible(snapShotSpan);
579
if (!IsVisible ||
_activeWpfTextView
is null)
594
var caretPoint = new SnapshotPoint(
_activeWpfTextView
.TextBuffer.CurrentSnapshot, node.SpanEnd);
599
_activeWpfTextView
.Caret.MoveTo(caretPoint);
600
_activeWpfTextView
.VisualElement.Focus();