| 123456789101112131415161718192021222324252627282930313233 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Input;namespace WpfStyleableWindow.StyleableWindow{    public class WindowCloseCommand :ICommand    {             public bool CanExecute(object parameter)        {            return true;        }#pragma warning disable 0067        public event EventHandler CanExecuteChanged;#pragma warning restore 0067        public void Execute(object parameter)        {            var window = parameter as Window;            if (window != null)            {                window.Close();            }        }    }}
 |