Example #1
0
        public static ShortcutKey ToShortcutKey(this ShortcutkeyProperty property)
        {
            if (property?.Value == null)
            {
                return(ShortcutKey.None);
            }

#if !WINDOWS_UWP
            ShortcutKey cached;
            if (_keyCache.TryGetValue(property.Key, out cached))
            {
                return(cached);
            }
#endif

            var result = ToShortcutKey(property.Value);

#if !WINDOWS_UWP
            _keyCache[property.Key] = result;
#endif

            return(result);
        }
 public static ShortcutKey ToShortcutKey(this ShortcutkeyProperty property)
 {
     return(property?.Value == null
                         ? ShortcutKey.None
                         : ToShortcutKey(property.Value));
 }