Example #1
0
File: CFile.cs Project: Daoting/dt
        static void OnToolbarChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CFile c   = (CFile)d;
            var   bar = (FrameworkElement)e.NewValue;

            if (bar != null)
            {
                bar.DataContext = c._fl;
            }
        }
Example #2
0
File: CFile.cs Project: Daoting/dt
        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);
                }
            }
        }