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

Drop shadow is not blinking after focus lost for modal dialogs #1815

Closed
maheshniec opened this issue Feb 24, 2015 · 2 comments
Closed

Drop shadow is not blinking after focus lost for modal dialogs #1815

maheshniec opened this issue Feb 24, 2015 · 2 comments
Milestone

Comments

@maheshniec
Copy link

Though EnabledDWMDropShadow is made true, drop shadow will not be blinked after losing the focus from application for modal dialogs.

@punker76 punker76 added this to the 1.2.0 milestone Feb 24, 2015
@punker76 punker76 modified the milestones: 1.2.1 or 2.0.0, 1.2.0 Jun 25, 2015
@Dotnetifier
Copy link
Contributor

I noticed that the MetroWindow frame doesn't blink either, whereas the sound does play. After hooking into the window message loop for a normal WPF window I got the following table:

msg wParam lParam
134 0 0
134 1 0
127 1 0
127 2 0
127 0 0
127 1 0
127 2 0
127 0 0
134 0 0
134 1 0

with the last two rows repeating themselves six times, making fourteen 134 messages total. The 134 message is the WM_NCACTIVATE message (wParam: 0 = inactive, 1 = active) and the 127 one is the WM_GETICON message (which I think isn't as important here).

Maybe the blink feature can be implemented by listening to these messages, but I don't have enough knowledge right now about the MetroWindow components and behaviors to write a solution for this.

@punker76 punker76 removed this from the 1.2.1 or 2.0.0 milestone Jan 5, 2016
@punker76 punker76 added this to the 2.0.0 milestone Oct 31, 2019
@punker76
Copy link
Member

This is now available in latest source and will be released with the next version (v2.0).

So you can bind to the WindowChromeBehavior property and handle this by yourself.

var behavior = new WindowChromeBehavior();

//...

this.SetBinding(IsNCActiveProperty, new Binding { Path = new PropertyPath(WindowChromeBehavior.IsNCActiveProperty), Source = behavior });

Interaction.GetBehaviors(this).Add(behavior);

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

No branches or pull requests

3 participants