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

            bar.OnOverflowVisibleChanged(newValue);
        }