Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating Window Title Flashing #85

Closed
gnimor opened this issue Oct 29, 2019 · 11 comments
Closed

Floating Window Title Flashing #85

gnimor opened this issue Oct 29, 2019 · 11 comments

Comments

@gnimor
Copy link

gnimor commented Oct 29, 2019

Hi,
I am using your fork of the AvalonDock framework (by the way - thanks for fixing all the annoying bugs :-)). Now when I undock a window to make it floating I can see a lot of flashing/flicker in the window title when I resize the window. Is it some wrong configuration on my side or is this the default behavior?

@Dirkster99
Copy link
Owner

I don't see a lot of flickering when I use any of the demo applications in the repository. I recomend testing with the demo projects and maybe even trying to scale down your custom views (for instance down to a simple textblock) to see if they are consuming a lot UI time for refreshing.

Otherwise, this one is a tough call and I don't think there is any special fix that would cure your problem (maybe trying a faster computer and the Release instead of the Debug version?).

Let me know if you find the cause for this as I am always interested to learn things that can potentially help others but I am closing this now since I don't think there is an easy fix even if this was a bug... maybe this could be more interesting and easier to understand if you could record a video with any of the test apps along with a description of the hardware and release build used?

@BobbyCannon
Copy link

I am able to reproduce this just by pulling the branch and running the "TestApp" pull out "Document2" then resize it. The title bar and window frame flashes when the window is resized. It seems like some logic to remove the title bar and frame for a "drag" look may be getting called on resize?

@Dirkster99
Copy link
Owner

Dirkster99 commented May 1, 2020

Yes, your right - I can verify these test steps. But I am not sure about a fix though… :-(

I was previously missing this because I used a different test client (MLibTest). And when I use this one I can see the flicker only on vertical resize (horizonatal, and horizontal+vertical with lower right corner looks OK to me). strange ... but thats why I must have missed it before...

@Dirkster99 Dirkster99 reopened this May 1, 2020
@BobbyCannon
Copy link

I'm looking but not finding why... I'll let you know if I find the issue.

@BobbyCannon
Copy link

BobbyCannon commented May 1, 2020

So here is a "fix"... remove <Setter Property="shell:WindowChrome.WindowChrome"> from the <Style x:Key="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}" TargetType="{x:Type avalonDockControls:LayoutAnchorableFloatingWindowControl}"> at line 1007 of generic.xml. Now I'm going to track down what about "WindowChrome" is causing the flashing.

@BobbyCannon
Copy link

Sorry I misspoke, it doesn't "fix" it but it does stop the flashing but adds the default title bar. I know we don't want the default bar so we'll need to track down exactly what the issue is. The issue seems to be in the WindowChrome code.

@jacobavenkraft
Copy link

I noticed as well that AvalonDock has its own WindowChrome implementation which seems to be just a copy of an earlier version included with .NET -- Microsoft has definitely made quite a few changes to their official WindowChrome implementation since AvalonDock first branched away from it.

@LyonJack
Copy link
Contributor

LyonJack commented Jul 2, 2020

As for Window Title Flashing, I found the reason for sure, because the content of the window is HwndHost. This problem is caused by the incompatibility between GDI and DX rendering methods. I try to change the base class of FloatingWindowContentHost to ContentControl, but this change will bring other problems. First, record the cause of the problem and the modification direction, and I will spend some time to solve the problem

@LyonJack
Copy link
Contributor

LyonJack commented Jul 2, 2020

15
@Dirkster99 @gnimor

@LyonJack
Copy link
Contributor

LyonJack commented Jul 2, 2020

I have resolve the flashing,by
image
@Dirkster99 @gnimor

@Dirkster99
Copy link
Owner

This fix works for me - pretty impressiv :bowtie: 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants