Пример #1
0
        public static void OffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RibbonTabScroller scroller = (RibbonTabScroller)d;
            double            offset   = (double)e.NewValue;

            scroller.SetOffset(offset);
        }
Пример #2
0
        public static void ColorPropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
        {
            RibbonTabScroller ts    = (RibbonTabScroller)o;
            Color             color = (Color)e.NewValue;

            ts.IsColorized = color != Colors.Transparent;
            ts.OnColorPopertyChanged(e);
        }
Пример #3
0
        public static void AlignmentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            RibbonTabScroller  scroller  = (RibbonTabScroller)d;
            RibbonBarAlignment alignment = (RibbonBarAlignment)e.NewValue;

            switch (alignment)
            {
            case RibbonBarAlignment.Right:
                scroller.ScrollRight();
                break;

            default:
                scroller.ScrollLeft();
                break;
            }

            scroller.InvalidateMeasure();
            scroller.InvalidateArrange();
        }
Пример #4
0
        private static void ScrollRightExecute(object sender, ExecutedRoutedEventArgs e)
        {
            RibbonTabScroller scroller = (RibbonTabScroller)sender;

            scroller.Alignment = RibbonBarAlignment.Right;
        }