static void OnToolbarChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { CFile c = (CFile)d; var bar = (FrameworkElement)e.NewValue; if (bar != null) { bar.DataContext = c._fl; } }
static void OnShowMenuChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { CFile c = (CFile)d; if (Ex.GetMenu(c) == null) { if ((bool)e.NewValue) { c.UpdateDefaultMenu(); } else { c._fl.ClearValue(Ex.MenuProperty); } } }