Esempio n. 1
0
        public object BuildControlForKey(BaseOnScreenKeyViewModel keyViewModel)
        {
            var virtualKeyViewModel = keyViewModel as VirtualKey;

            if (virtualKeyViewModel != null)
            {
                if (virtualKeyViewModel.Key == VirtualKeyCode.LWIN || virtualKeyViewModel.Key == VirtualKeyCode.RWIN)
                {
                    return(new WindowsKeyTemplate()
                    {
                        DataContext = keyViewModel
                    });
                }
            }
            var template = new DefaultKeyTemplate
            {
                DataContext = keyViewModel
            };

            return(template);
        }
Esempio n. 2
0
 /// <summary>
 /// Build the control that is to be used for the given key view model
 /// </summary>
 /// <param name="keyViewModel">The key view model.</param>
 /// <returns></returns>
 public object BuildContentControlForKey(BaseOnScreenKeyViewModel keyViewModel)
 {
     return(OnScreenKeyControlBuilder.BuildControlForKey(keyViewModel));
 }