Esempio n. 1
0
        public static void IsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OdcExpander     expander = d as OdcExpander;
            RoutedEventArgs args     = new RoutedEventArgs((bool)e.NewValue ? ExpandedEvent : CollapsedEvent);

            expander.RaiseEvent(args);
        }
Esempio n. 2
0
        public static void OnMinimizedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            bool            minimized = (bool)e.NewValue;
            OdcExpander     expander  = d as OdcExpander;
            RoutedEventArgs args      = new RoutedEventArgs(minimized ? MinimizedEvent : MaximizedEvent);

            expander.IsEnabled = !minimized;
            expander.RaiseEvent(args);
        }