public IRunHotKeyService UnBind()
        {
            if (runKey != null)
                hotKeys.Remove(runKey.Key, runKey.Modifier);

            runKey = null;
            return this;
        }
        public static Key GetKey(this KeyViewModel viewModel)
        {
            if (viewModel == null)
            {
                return(Key.None);
            }

            return(viewModel.Key);
        }
        public IRunHotKeyService Bind(Key key, ModifierKeys modifier)
        {
            if (runKey == null || runKey.Key != key || runKey.Modifier != modifier)
            {
                hotKeys.Add(key, modifier, OnRunHotKeyPressed);
                UnBind();

                runKey = new KeyViewModel(key, modifier);
            }

            return this;
        }
 public static void SetKey(DependencyObject obj, KeyViewModel value)
 {
     obj.SetValue(KeyProperty, value);
 }