private static void IsMinimizedChanged(OdcExpander expander, AvaloniaPropertyChangedEventArgs e) { bool minimized = (bool)e.NewValue; expander.IsEnabled = !minimized; RoutedEventArgs args = new RoutedEventArgs(minimized ? MinimizedEvent : MaximizedEvent); expander.RaiseEvent(args); }
private static void HeaderClassesChanged(OdcExpander o, AvaloniaPropertyChangedEventArgs e) { if (e.NewValue is Classes && o._header != null) { Classes classes = e.NewValue as Classes; foreach (var item in classes) { if (o._header.Classes.Contains(item) == false) { o._header.Classes.Add(item); } } } }
private static void IsExpandedChanged(OdcExpander expander, AvaloniaPropertyChangedEventArgs e) { RoutedEventArgs args = new RoutedEventArgs((bool)e.NewValue ? ExpandedEvent : CollapsedEvent); expander.RaiseEvent(args); }
private static void PressedHeaderBackgroundPropertyChangedCallback(OdcExpander expander, AvaloniaPropertyChangedEventArgs e) { expander.HasPressedBackground = e.NewValue != null; }