Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Feb 13, 2020
2 parents ba902ef + 195387d commit 72a5f07
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
3 changes: 1 addition & 2 deletions appveyor.yml
Expand Up @@ -22,13 +22,12 @@ image: Visual Studio 2019
test: off

install:
- cinst dotnetcore-sdk --version=3.1.100
#- cinst dotnetcore-sdk --version=3.1.100

pull_requests:
do_not_increment_build_number: false

build_script:
- ps: .\build.ps1 --bootstrap
- ps: .\build.ps1 -target CI

artifacts:
Expand Down
28 changes: 14 additions & 14 deletions src/ControlzEx/Behaviors/WindowChromeBehavior.cs
Expand Up @@ -227,7 +227,7 @@ protected override void OnAttached()
{
try
{
this.AssociatedObject.AllowsTransparency = false;
this.AssociatedObject.SetCurrentValue(Window.AllowsTransparencyProperty, false);
}
catch (Exception)
{
Expand All @@ -237,7 +237,7 @@ protected override void OnAttached()

if (this.AssociatedObject.WindowStyle != WindowStyle.None)
{
this.AssociatedObject.WindowStyle = WindowStyle.None;
this.AssociatedObject.SetCurrentValue(Window.WindowStyleProperty, WindowStyle.None);
}

this.savedBorderThickness = this.AssociatedObject.BorderThickness;
Expand Down Expand Up @@ -269,8 +269,8 @@ private void TopMostHack()
{
var raiseValueChanged = this.topMostChangeNotifier.RaiseValueChanged;
this.topMostChangeNotifier.RaiseValueChanged = false;
this.AssociatedObject.Topmost = false;
this.AssociatedObject.Topmost = true;
this.AssociatedObject.SetCurrentValue(Window.TopmostProperty, false);
this.AssociatedObject.SetCurrentValue(Window.TopmostProperty, true);
this.topMostChangeNotifier.RaiseValueChanged = raiseValueChanged;
}
}
Expand Down Expand Up @@ -323,8 +323,8 @@ private static void OnIgnoreTaskbarOnMaximizeChanged(DependencyObject d, Depende
// Since IgnoreTaskbarOnMaximize is not changed all the time this hack seems to be less risky than anything else.
if (behavior.AssociatedObject?.WindowState == WindowState.Maximized)
{
behavior.AssociatedObject.WindowState = WindowState.Normal;
behavior.AssociatedObject.WindowState = WindowState.Maximized;
behavior.AssociatedObject.SetCurrentValue(Window.WindowStateProperty, WindowState.Normal);
behavior.AssociatedObject.SetCurrentValue(Window.WindowStateProperty, WindowState.Maximized);
}
}

Expand Down Expand Up @@ -471,7 +471,7 @@ private void HandleMaximize()
// Dragging the window to the top with those things set does not change the height of the Window
if (this.AssociatedObject.SizeToContent != SizeToContent.Manual)
{
this.AssociatedObject.SizeToContent = SizeToContent.Manual;
this.AssociatedObject.SetCurrentValue(Window.SizeToContentProperty, SizeToContent.Manual);
}

if (this.windowHandle != IntPtr.Zero)
Expand Down Expand Up @@ -508,8 +508,8 @@ private void HandleMaximize()
// Note that the minimize animation in this case does actually run, but somehow the other
// application (Google Chrome in this example) is instantly switched to being the top window,
// and so blocking the animation view.
this.AssociatedObject.Topmost = false;
this.AssociatedObject.Topmost = this.AssociatedObject.WindowState == WindowState.Minimized || this.savedTopMost;
this.AssociatedObject.SetCurrentValue(Window.TopmostProperty, false);
this.AssociatedObject.SetCurrentValue(Window.TopmostProperty, this.AssociatedObject.WindowState == WindowState.Minimized || this.savedTopMost);

this.topMostChangeNotifier.RaiseValueChanged = raiseValueChanged;
}
Expand Down Expand Up @@ -556,24 +556,24 @@ private void HandleBorderAndResizeBorderThicknessDuringMaximize()
}

// set window border, so we can move the window from top monitor position
this.AssociatedObject.BorderThickness = new Thickness(0, 0, rightBorderThickness, bottomBorderThickness);
this.AssociatedObject.SetCurrentValue(Control.BorderThicknessProperty, new Thickness(0, 0, rightBorderThickness, bottomBorderThickness));
}
else // Can't get monitor info, so just remove all border thickness
{
this.AssociatedObject.BorderThickness = new Thickness(0);
this.AssociatedObject.SetCurrentValue(Control.BorderThicknessProperty, new Thickness(0));
}

this.ResizeBorderThickness = new Thickness(0);
this.SetCurrentValue(ResizeBorderThicknessProperty, new Thickness(0));
}
else
{
this.AssociatedObject.BorderThickness = this.savedBorderThickness.GetValueOrDefault(new Thickness(0));
this.AssociatedObject.SetCurrentValue(Control.BorderThicknessProperty, this.savedBorderThickness.GetValueOrDefault(new Thickness(0)));

var resizeBorderThickness = this.savedResizeBorderThickness.GetValueOrDefault(new Thickness(0));

if (this.ResizeBorderThickness != resizeBorderThickness)
{
this.ResizeBorderThickness = resizeBorderThickness;
this.SetCurrentValue(ResizeBorderThicknessProperty, resizeBorderThickness);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3"
"version": "3.1.101"
}
}

0 comments on commit 72a5f07

Please sign in to comment.