These are chat archives for AvaloniaUI/Avalonia

28th
Apr 2017
Eli Arbel
@aelij
Apr 28 2017 03:09
@grokys > do you have a repro?
Yes, it's in the AvaloniaEdit demo. Just type a "." and the completion popup will open black.
@danwalmsley I've tried calling InvalidateVisual using a DispatcherTimer, didn't work
Perhaps I'm doing something wrong
danwalmsley
@danwalmsley
Apr 28 2017 08:19
@aelij on avalonstudio, once I updated the list inside my intellisense popup it would re-render and show contents
perhaps can you trigger a resize once open?
@aelij I can also get it to redraw by selecting a different item in my list box
danwalmsley
@danwalmsley
Apr 28 2017 08:27
@aelij I also suffer from the popup not getting its size correct the first time either
blackpopupbug.gif
Eli Arbel
@aelij
Apr 28 2017 10:38
@danwalmsley Thanks, I'll take a look at your code later
danwalmsley
@danwalmsley
Apr 28 2017 10:58
the relevant code is here, I'm assuming it cant be too different to what you have
Eli Arbel
@aelij
Apr 28 2017 11:10
I'm not using the Popup class, but rather I inherited from PopupRoot, since I wanted to preserve the AvalonEdit API
Nikita Tsukanov
@kekekeks
Apr 28 2017 11:49
It probably won't work this way
Steven Kirk
@grokys
Apr 28 2017 12:32
yeah @aelij PopupRoot without Popup is kinda new territory - there may be something else you need to do, though the code for Popup is very simple
however PopupRoot is internal in WPF, does AvalonEdit directly use it there?
Eli Arbel
@aelij
Apr 28 2017 14:27
@grokys No, AvalonEdit uses a full Window, but I haven't seen a way to create an unactivated, chromeless window in Avalonia using the Window class.
All Popup does (from what I can tell) is populate the PopupRoot's Content and call its Show method, which is what I'm doing. But I must be missing something.
danwalmsley
@danwalmsley
Apr 28 2017 14:46
@aelij you can make window chromeless with <Window HasSystemDecorations = "false" />
I don't know about hiding it though
tooltips are working fine
maybe compare with this code
Eli Arbel
@aelij
Apr 28 2017 15:18
I tried but it didn't work for some reason. Also, no way of showing the window unactivated - it can't have focus since the editor always need to be in focus.
Nikita Tsukanov
@kekekeks
Apr 28 2017 15:31
I guess we need a way to apply popup style to a regular window
Well, wait
You shouldn't be using PopupRoot directly anyway
Since there will be environments without an actual windowing system
Where popups are composited directly on the output surface on top of the main content
There are no windows there, only framebuffer
I haven't decided on design yet, but popup implementation will be probably provided by toplevel itself
This also applies to rendering on top of 3D scene in games, etc
So, if someone decides to create something like SHENZHEN I/O, he won't be able to use completions
Eli Arbel
@aelij
Apr 28 2017 16:14
Hmm. But wouldn't PopupRoot take care of it even in those situations as well? Popup is an element that appears as part of the visual tree so it could provide relative positioning and inheritance context.
Well, I guess the design would need to change a bit anyhow.
I'll try to see if I can use Popup directly
Steven Kirk
@grokys
Apr 28 2017 17:09
yeah, i think popuproot would need to change in those situations - it's used by e.g. dropdowns
i'm not sure why popuproot doesn't work for you - i should be able to take a look tomorrow though
Big Jake
@jakesays
Apr 28 2017 18:11
so how goes he battle?
any progress on a .net core port?
danwalmsley
@danwalmsley
Apr 28 2017 19:55
Dot net core is now supported!