Exemplo n.º 1
0
        private void HighlightSelectedKey(KeyboardKey key)
        {
            foreach (var b in keyboard.KeyViews)
            {
                b.ClearValue(BorderBrushProperty);
                b.ClearValue(BackgroundProperty);
            }

            var btn = keyboard[key.IsoCode];

            btn.BorderBrush = SystemColors.HighlightBrush;
            btn.Background  = SystemColors.HighlightBrush;
        }
Exemplo n.º 2
0
        internal Button GenerateKeyView(KeyboardKey key)
        {
            var btn = new Button();

            if (key.Type == EKeyType.Shift)
            {
                btn.Content = "Shift";
            }
            else
            {
                btn.Content = key.IsoCode;
            }
            btn.Width  = 32.0 * key.Weight;
            btn.Height = 32;
            btn.Margin = new Thickness(4);
            btn.Tag    = key;
            return(btn);
        }
Exemplo n.º 3
0
 public SetSelectedKey(KeyboardKey key)
 {
     Value = key;
 }