コード例 #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;
        }