private static void SelectedItemChangedEvent(DependencyObject d, DependencyPropertyChangedEventArgs e) { BreadcrumbButton button = d as BreadcrumbButton; if (button.IsInitialized) { RoutedEventArgs args = new RoutedEventArgs(SelectedItemChanged); button.RaiseEvent(args); } }
private static void OverflowPressedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { BreadcrumbButton button = d as BreadcrumbButton; button.OnOverflowPressedChanged(); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); comboBox = GetTemplateChild(partComboBox) as ComboBox; rootButton = GetTemplateChild(partRoot) as BreadcrumbButton; if (comboBox != null) { comboBox.DropDownClosed += comboBox_DropDownClosed; comboBox.IsKeyboardFocusWithinChanged += comboBox_IsKeyboardFocusWithinChanged; comboBox.KeyDown += comboBox_KeyDown; } if (rootButton != null) { rootButton.Click += rootButton_Click; } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); comboBox = GetTemplateChild(partComboBox) as ComboBox; rootButton = GetTemplateChild(partRoot) as BreadcrumbButton; if (comboBox != null) { comboBox.DropDownClosed += new EventHandler(comboBox_DropDownClosed); comboBox.IsKeyboardFocusWithinChanged += new DependencyPropertyChangedEventHandler(comboBox_IsKeyboardFocusWithinChanged); comboBox.KeyDown += new KeyEventHandler(comboBox_KeyDown); } if (rootButton != null) { rootButton.Click += new RoutedEventHandler(rootButton_Click); } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); comboBox = GetTemplateChild(partComboBox) as ComboBox; rootButton = GetTemplateChild(partRoot) as BreadcrumbButton; if (comboBox != null) { comboBox.StaysOpenOnEdit = true; comboBox.DropDownClosed += new EventHandler(comboBox_DropDownClosed); comboBox.KeyDown += new KeyEventHandler(comboBox_KeyDown); comboBox.Loaded += comboBox_Loaded; } if (rootButton != null) rootButton.Click += new RoutedEventHandler(rootButton_Click); }