protected virtual void Enable(IUserInterfaceWindow window) { var behaviour = new MinMaxBehaviour(window.Handle); behaviour.InitializeComponent(this.Core); this.Behaviours.Add(window, behaviour); }
protected virtual void OnLoaded(object sender, RoutedEventArgs e) { var window = sender as Window; if (window == null) { return; } var behaviour = new MinMaxBehaviour(window); if (!this.Behaviours.TryAdd(window, behaviour)) { return; } behaviour.Enable(); }