Menu popup position fix;

move minmaxsize logic from behavior to avoid use behavior in MarkupExtensionProperties;
WindowHeaderBrush improve for DevLab colors
This commit is contained in:
2019-04-21 00:24:08 +03:00
parent 4abae309d5
commit 77b83a61d8
9 changed files with 125 additions and 88 deletions

View File

@@ -3,7 +3,6 @@ using System;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
using System.Windows.Media;
namespace BrightSharp.Extensions
@@ -157,12 +156,11 @@ namespace BrightSharp.Extensions
if (window == null) return;
if ((bool)e.NewValue)
{
Interaction.GetBehaviors(window).Add(new WindowMinMaxSizeBehavior());
new MinMaxSize_Logic(window).OnAttached();
}
else
{
var beh = Interaction.GetBehaviors(window).OfType<WindowMinMaxSizeBehavior>().FirstOrDefault();
if (beh != null) Interaction.GetBehaviors(window).Remove(beh);
// Not supported yet
}
}
}