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

            bar.OnOverflowVisibleChanged(newValue);
        }