protected virtual void OnIsActiveChanged(object sender, RoutedEventArgs e) { FrameworkElement Element = sender as FrameworkElement; while (Element != null) { ToolBarTray AsToolBarTray; if ((AsToolBarTray = Element as ToolBarTray) != null) { PrettyItemsControl.MakeToolBarTrayPretty(AsToolBarTray); break; } Element = Element.Parent as FrameworkElement; } }
private void OnMainToolBarLoaded(object sender, RoutedEventArgs e) { NotifyMainToolBarLoaded(e); PrettyItemsControl.MakeToolBarTrayPretty((ToolBarTray)sender); }