Closed wunianqing closed 5 years ago
I just found that version 1.6 and 1.6.1 are good. I cannot compile the 1.6.2, 1.6.3 and 1.6.4. And 1.6.5 is NG.
@wunianqing This is related to the new/changed implementation of the borderless behavior in ControlzEx v4.0 alpha.
/cc @batzen I can reproduce this in a Win7 test VM, but didn't know how to solve this. (Another effect is while changing focus from Window to another Window is that the win 7 aero theme is shown for one second. I don't know if I want to fix this... 🙈 )
@punker76 Could you move this issue to ControlzEx? Will have a look at this.
@batzen Transfering issues is only allowed in the same organization level, so I will create a new one at ControlzEx and reference this one.
Thx. @punker76
I replaced the InitializeWindowChromeBehavior
in MetroWinow.cs with the following code before issue is fixed. For now, it works fine. I don't know if this will cause other problems.
private void InitializeWindowChromeBehavior()
{
WindowStyle = WindowStyle.None;
WindowChrome.SetWindowChrome(this, new WindowChrome()
{
CaptionHeight = 0,
CornerRadius = new CornerRadius(0.0),
GlassFrameThickness = new Thickness(1),
UseAeroCaptionButtons = false,
NonClientFrameEdges = NonClientFrameEdges.None
});
//var behavior = new BorderlessWindowBehavior();
//Interaction.GetBehaviors(this).Add(behavior);
}
Describe the bug Original window style can be seen when switch window in Win7.
To Reproduce Steps to reproduce the behavior:
Expected behavior CornerRadius should be 0. And style of window should not change.
Screenshots [Expected]
[Actual]
[Screen record]
Environment(please complete the following information):
Additional context This only happen in some real machines. But it can be easy reproduced on virtual machine. And once you set Performance Options -> Visual Effects -> Adjust for best performance. This problem will no longer exist.