-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[WIP] Use Microsoft.Windows.Shell instead of hand-coded solution for WinForms interop #503
Conversation
… DWM non-client rendering directly. Added http://archive.msdn.microsoft.com/WPFShell for MA.M .NET 4 client profile. Fixes #481, #488, #496.
@shiftkey interop demo works for me panorama demo has no drop shadow (is this correct?) this should fix the missing drop shadow case Constants.WM_NCPAINT:
{
if (ShouldHaveBorder())
{
this.AddBorder();
}
else if (EnableDWMDropShadow)
{
var metroWindow = AssociatedObject as MetroWindow;
if (!(metroWindow != null && metroWindow.GlowBrush != null))
{
var val = 2;
UnsafeNativeMethods.DwmSetWindowAttribute(_mHWND, 2, ref val, 4);
var m = new MARGINS { bottomHeight = 1, leftWidth = 1, rightWidth = 1, topHeight = 1 };
UnsafeNativeMethods.DwmExtendFrameIntoClientArea(_mHWND, ref m);
}
}
handled = true;
}
break; my machine: win 7 64 bit net 4 |
@punker76 no, that sounds wrong. Damnit. |
@shiftkey I think it is better to keep |
well testing i see this :S i test the recent changes 06/06/2013 (this branch) |
well reading this PR i see this and in the metrowindowDEMO i set the allowtransparency = false (xaml) and i finally can add a picturebox in the demo http://img855.imageshack.us/img855/3233/qywf.jpg NOTE: if you set in the xaml this is true you can see the windowsformhost BUT you cant see the glow in the borders < Controls:MetroWindow.GlowBrush> exist the chance for add a new dependency property for the allow transparency ? and remove the lane ? |
Another bug that may be related #571. |
i need this merge :( |
If someone can sanity check b8734dd for me (separating out |
Another issue: #560 |
:( you can merge more PRs ? :D |
@spiritdead I think I'll just push it up now and create a new package. If something comes up we should be able to turn it around quickly... |
ok @shiftkey if in the future you need rollback is better make a backup, and thx for merge i rly need this fix |
i have a dude or problem, during the animations move or flyout close/open the objects winforms not move correctly example this |
Merged |
I don't understand. Please open a different issue with details. |
ok |
This is the work that @bitterskittles started which should resolve a number of issues spotted recently:
Other changes:
Microsoft.Windows.Shell
fornet40
AllowTransparency = !EnableDWMDropShadow
- the demo shows how you disable this but it seems like the this should be the defaultTODO:
AllowTransparency = true
by default - this lineAllowTransparency
dependency property into BorderlessWindowBehaviour and replace the related EnableDWMDropShadow usagesAllowTransparency
insteadThanks again to @bitterskittles for getting to the bottom of this.