예제 #1
0
        protected virtual void Enable(IUserInterfaceWindow window)
        {
            var behaviour = new MinMaxBehaviour(window.Handle);

            behaviour.InitializeComponent(this.Core);
            this.Behaviours.Add(window, behaviour);
        }
예제 #2
0
        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();
        }