private void OnOdcExpanderClassesChanged(OutlookBar o, AvaloniaPropertyChangedEventArgs e) { if (OdcExpanderClasses != null) { foreach (var item in Items.OfType <IControl>().SelectMany(x => x.GetLogicalChildren().OfType <OdcExpander>())) { foreach (string cls in OdcExpanderClasses.ToList()) { item.Classes.Add(cls); } } } }
private void buttonClickedEvent(object sender, RoutedEventArgs e) { OutlookBar bar = OutlookBar; ToggleButton b = e.Source as ToggleButton; if (b != null) { b.IsChecked = true; } if (bar != null) { bar.SelectedSection = this; } OnClick(); }
private void OnOptionButtonClassesChanged(OutlookBar o, AvaloniaPropertyChangedEventArgs e) { if (e.NewValue is Classes) { foreach (var item in OptionButtons) { if (item is ToggleButton) { continue; } foreach (var itemClass in (e.NewValue as Classes)) { if (item.Classes.Contains(itemClass) == false) { item.Classes.Add(itemClass); } } } } }
private void SizeChanged(OutlookBar o, AvaloniaPropertyChangedEventArgs e) { ApplySections(); }
private void MaximizedPropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e) { bar.OnMaximizedChanged((bool)e.NewValue); }
private void MaxNumberOfButtonsChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e) { bar.ApplySections(); }
private void IsPopupVisibleChanged(OutlookBar o, AvaloniaPropertyChangedEventArgs e) { o.OnPopupVisibleChanged((bool)e.NewValue); }
private void SelectedIndexPropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e) { bar.ApplySections(); }
private void SelectedSectionPropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e) { bar.OnSelectedSectionChanged(e.OldValue as OutlookSection, (OutlookSection)e.NewValue); }
private void OverflowVisiblePropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e) { bool newValue = (bool)e.NewValue; bar.OnOverflowVisibleChanged(newValue); }