editor.IntelliPrompt.RepositionAll() doesn't work

SyntaxEditor for WPF Forum

Posted 4 years ago by Matt Whitfield
Version: 16.1.0630
Platform: .NET 4.0
Environment: Windows 10 (64-bit)
Avatar

editor.IntelliPrompt.RepositionAll doesn't work when the control is moved within a window. Because the placement rectangle of the popup is relative to the editor control, the placement rectangle value doesn't change if it is the editor itself that is moved.

Thus, hooking onto Window.LocationChanged and calling editor.IntelliPrompt.RepositionAll() does nothing.

I was able to work around that in my smart tag session by setting an offset to either 0 or 0.0001 on each reposition call and adding that to the popup's placement rectangle.

I have also managed to make the same fix by sub-classing the completion session.

However - I can't see a way to make the parameter info session reposition correctly.

So, two questions would be:

1) Is this a problem or am I doing something wrong somewhere?

2) Is there any way to persuade the parameter info popup to move properly until a fix is available?

Edit -> corrected question 2 to refer to parameter info popup, not the quick info popup

[Modified 4 years ago]

Comments (1)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Matt,

It looks like in WPF if the PlacementRectangle doesn't get changed (with a different value) and another placement-related property isn't changed, nothing updates.  We found this on StackOverflow thread that suggested bumping the HorizontalOffset in that scenario:

http://stackoverflow.com/questions/1600218/how-can-i-move-a-wpf-popup-when-its-anchor-element-moves

We're adding that logic to our popups for the next maintenance release.  I'm not sure you can do anything in the meantime though.  But if you need a preview build of the changes, you can write our support address and we can build one for you.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.