public SegmentedScrollBarBehaviors(SegmentedScrollBar scrollBar) { _scrollBar = scrollBar; _scrollBar.MouseEnter += (_, _) => NavigationCanExecuteChanged(); _scrollBar.MouseLeave += (_, _) => NavigationCanExecuteChanged(); _scrollBar.ValueChanged += (_, _) => { NavigationCanExecuteChanged(); SegmentNavigationCanExecuteChanged(); }; _scrollBar.ValueChanged += (_, _) => JumpOffSegmentBoundary(); _scrollBar.PreviousSegmentCommand = new DelegateCommand(() => OnSegmentButtonClick(ButtonType.LeftSegmentButton), () => CanExecutePreviousSegmentCommand); _scrollBar.NextSegmentCommand = new DelegateCommand(() => OnSegmentButtonClick(ButtonType.RightSegmentButton), () => CanExecuteNextSegmentCommand); }
public SegmentedScrollBarDrawing(SegmentedScrollBar scrollBar) { _scrollBar = scrollBar; }