internal ButtonManager(KeyboardControl parent, ButtonBase button) { _parent = parent; Button = button; button.Command = this; }
internal static PredictionButtonManager CreateInstance(KeyboardControl parent, PredictionKey key) { var button = new KeyboardButton(); var manager = new PredictionButtonManager(parent, key, button); return(manager); }
internal static CustomCommandButtonManager CreateInstance(KeyboardControl parent, CommandKey key) { Debug.Assert(!key.Toggles); ButtonBase button = new KeyboardButton(); var manager = new CustomCommandButtonManager(parent, key, button); return(manager); }
internal static TextButtonManager CreateInstance(KeyboardControl parent, TextKey key) { var button = new KeyboardButton(); var manager = new TextButtonManager(parent, key, button); manager.UpdateStateModifiers(); return(manager); }
internal static ModifierCommandButtonManager CreateInstance(KeyboardControl parent, CommandKey key) { Debug.Assert(key.Toggles); ButtonBase button = new KeyboardToggleButton(); var manager = new ModifierCommandButtonManager(parent, key, button); manager.UpdateStateModifiers(); return(manager); }
internal CommandButtonManager(KeyboardControl parent, CommandKey key, ButtonBase button) : base(parent, key, button) { if (key.Label != null) { button.Content = key.Label; } else { var template = parent.Resources[key.Icon]; if (template != null) { button.ContentTemplate = (DataTemplate)template; } else { Debug.Fail($"No template for {key.Icon}"); button.Content = key.Icon; } } }
private CustomCommandButtonManager(KeyboardControl parent, CommandKey key, ButtonBase button) : base(parent, key, button) { }
private FunctionCommandButtonManager(KeyboardControl parent, CommandKey key, ButtonBase button) : base(parent, key, button) { _keyName = (KeyName)Enum.Parse(typeof(KeyName), _key.CommandParameter); }
internal KeyboardGrid(KeyboardControl parent) { _parent = parent; }
public PredictionButtonManager(KeyboardControl parent, PredictionKey key, ButtonBase button) : base(parent, key, button) { }
public TextButtonManager(KeyboardControl parent, TextKey key, Button button) : base(parent, key, button) { }