/// <summary> /// Initializes static members of the <see cref="DropDown"/> class. /// </summary> static DropDown() { ItemsPanelProperty.OverrideDefaultValue <DropDown>(DefaultPanel); FocusableProperty.OverrideDefaultValue <DropDown>(true); SelectedItemProperty.Changed.AddClassHandler <DropDown>(x => x.SelectedItemChanged); KeyDownEvent.AddClassHandler <DropDown>(x => x.OnKeyDown, Interactivity.RoutingStrategies.Tunnel); }
/// <summary> /// Initializes static members of the <see cref="ComboBox"/> class. /// </summary> static ComboBox() { ItemsPanelProperty.OverrideDefaultValue <ComboBox>(DefaultPanel); FocusableProperty.OverrideDefaultValue <ComboBox>(true); SelectedItemProperty.Changed.AddClassHandler <ComboBox>((x, e) => x.SelectedItemChanged(e)); KeyDownEvent.AddClassHandler <ComboBox>((x, e) => x.OnKeyDown(e), Interactivity.RoutingStrategies.Tunnel); }
static MainWindow() { KeyDownEvent.AddClassHandler <MainWindow>(w => w.HandleKeyDown, RoutingStrategies.Tunnel); }