Beispiel #1
0
 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);
             }
         }
     }
 }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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);
                        }
                    }
                }
            }
        }
Beispiel #4
0
 private void SizeChanged(OutlookBar o, AvaloniaPropertyChangedEventArgs e)
 {
     ApplySections();
 }
Beispiel #5
0
 private void MaximizedPropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e)
 {
     bar.OnMaximizedChanged((bool)e.NewValue);
 }
Beispiel #6
0
 private void MaxNumberOfButtonsChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e)
 {
     bar.ApplySections();
 }
Beispiel #7
0
 private void IsPopupVisibleChanged(OutlookBar o, AvaloniaPropertyChangedEventArgs e)
 {
     o.OnPopupVisibleChanged((bool)e.NewValue);
 }
Beispiel #8
0
 private void SelectedIndexPropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e)
 {
     bar.ApplySections();
 }
Beispiel #9
0
 private void SelectedSectionPropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e)
 {
     bar.OnSelectedSectionChanged(e.OldValue as OutlookSection, (OutlookSection)e.NewValue);
 }
Beispiel #10
0
        private void OverflowVisiblePropertyChanged(OutlookBar bar, AvaloniaPropertyChangedEventArgs e)
        {
            bool newValue = (bool)e.NewValue;

            bar.OnOverflowVisibleChanged(newValue);
        }