public static void OffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { RibbonTabScroller scroller = (RibbonTabScroller)d; double offset = (double)e.NewValue; scroller.SetOffset(offset); }
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); }
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(); }
private static void ScrollRightExecute(object sender, ExecutedRoutedEventArgs e) { RibbonTabScroller scroller = (RibbonTabScroller)sender; scroller.Alignment = RibbonBarAlignment.Right; }