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);
        }
Esempio n. 2
0
 public SegmentedScrollBarDrawing(SegmentedScrollBar scrollBar)
 {
     _scrollBar = scrollBar;
 }