2019-04-21 00:24:08 +03:00
|
|
|
|
using System.Windows;
|
2017-09-09 11:53:21 +03:00
|
|
|
|
using System.Windows.Interactivity;
|
|
|
|
|
|
using System.Windows.Interop;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BrightSharp.Behaviors
|
|
|
|
|
|
{
|
|
|
|
|
|
public class WindowMinMaxSizeBehavior : Behavior<Window>
|
|
|
|
|
|
{
|
|
|
|
|
|
private HwndSource hwndSource;
|
2019-04-21 00:24:08 +03:00
|
|
|
|
private MinMaxSize_Logic logic;
|
2017-09-09 11:53:21 +03:00
|
|
|
|
protected override void OnAttached()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.OnAttached();
|
2019-04-21 00:24:08 +03:00
|
|
|
|
logic = new MinMaxSize_Logic(AssociatedObject);
|
|
|
|
|
|
logic.OnAttached();
|
2017-09-09 11:53:21 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-04-21 00:24:08 +03:00
|
|
|
|
|
2017-09-09 11:53:21 +03:00
|
|
|
|
protected override void OnDetaching()
|
|
|
|
|
|
{
|
2019-04-21 00:24:08 +03:00
|
|
|
|
logic.OnDetaching();
|
2017-09-09 11:53:21 +03:00
|
|
|
|
base.OnDetaching();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|