I have implemented something similar to your recent "ServerTags" sample, but with a bit more complexity. I have found that if my caret is off-screen (i.e. click at the beginning of a document and then scroll down using mouse scroll wheel) and then I hover over a syntax element in an embedded C# code nugget, the quick info display will case the SyntaxEditor window to scroll to the location of the caret.
This is triggered by the following method with the full call stack at the bottom of this post:
ActiproSoftware.SyntaxEditor.Addons.DotNet.Wpf.dll!ActiproSoftware.Text.Languages.CSharp.Implementation.CSharpQuickInfoProvider.RequestSession(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView view, object context)
Could you tell me the conditions under which the RequestSession method chooses to call ScrollToCaret? I had a source code license for all of this, but the version it is good for is a bit old, so I was hoping you could tell me the criteria for the scroll so that I could just avoid the condition that is triggering this behavior.
> Mist.exe!Varigence.Mist.Editors.Template.TemplateEditor.ActiveViewOnTextAreaLayout(object sender, ActiproSoftware.Windows.Controls.SyntaxEditor.TextViewTextAreaLayoutEventArgs textViewTextAreaLayoutEventArgs) Line 385 C#
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.TextView.#Dkc(ActiproSoftware.Windows.Controls.SyntaxEditor.TextViewTextAreaLayoutEventArgs #yhb) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.PerformViewLineLayout() Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.FirstVisiblePosition.set(ActiproSoftware.Text.TextPosition value) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.EnsureVisible(ActiproSoftware.Text.TextPosition position, bool scrollToVerticalMiddle) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.ScrollToCaret() Unknown
ActiproSoftware.SyntaxEditor.Addons.DotNet.Wpf.dll!ActiproSoftware.Text.Languages.CSharp.Implementation.CSharpQuickInfoProvider.RequestSession(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView view, object context) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.QuickInfoProviderBase.RequestSession(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView view, object context, bool canTrackMouse) Unknown
WpfControls.dll!Varigence.Windows.Controls.AstFramework.SyntaxEditor.BimlScriptQuickInfoProvider.RequestSession(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView view, object context) Line 71 C#
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.QuickInfoProviderBase.RequestSession(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView view, object context, bool canTrackMouse) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.QuickInfoProviderBase.#9fc(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView #N5b, System.Windows.Input.MouseEventArgs #yhb) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation.QuickInfoProviderBase.#Wfc(ActiproSoftware.Windows.Controls.SyntaxEditor.IEditorView #N5b, System.Windows.Input.MouseEventArgs #yhb) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.OnMouseHover(System.Windows.Input.MouseEventArgs e) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.OnMouseHoverEvent(object sender, System.Windows.Input.MouseEventArgs e) Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.RaiseMouseHoverEvent(System.Windows.Input.MouseEventArgs e) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Primitives.EditorView.ProcessUniversalTimerTickForMouseHover(ActiproSoftware.Windows.Controls.SyntaxEditor.Implementation.UniversalTimer timer) Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Implementation.UniversalTimer.#Njc() Unknown
ActiproSoftware.SyntaxEditor.Wpf.dll!ActiproSoftware.Windows.Controls.SyntaxEditor.Implementation.UniversalTimer.#Ny(object #xhb, object #yhb) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherTimer.FireTick(object unused) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown
PresentationFramework.dll!System.Windows.Application.Run() Unknown
Mist.exe!Varigence.Mist.App.Main() C#
[Native to Managed Transition]
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Unknown