2 instantiations of ScrollBar
PresentationFramework (2)
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
8721
bamlType.DefaultConstructor = delegate() { return new System.Windows.Controls.Primitives.
ScrollBar
(); };
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
1521
case KnownElements.ScrollBar: o = new System.Windows.Controls.Primitives.
ScrollBar
(); break;
192 references to ScrollBar
PresentationFramework (192)
src\Framework\System\Windows\Automation\Peers\ScrollBarAutomationPeer.cs (4)
17
public ScrollBarAutomationPeer(
ScrollBar
owner): base(owner)
49
return ((
ScrollBar
)Owner).Orientation == Orientation.Horizontal ?
59
ScrollBar
sb = Owner as
ScrollBar
;
src\Framework\System\Windows\Controls\Orientation.cs (1)
8
/// Examples of these elements include: <see cref="Slider" /> and <see cref="Primitives.
ScrollBar
" />.
src\Framework\System\Windows\Controls\Primitives\ScrollBar.cs (105)
77
public static readonly RoutedEvent ScrollEvent = EventManager.RegisterRoutedEvent("Scroll", RoutingStrategy.Bubble, typeof(ScrollEventHandler), typeof(
ScrollBar
));
111
= DependencyProperty.Register("Orientation", typeof(Orientation), typeof(
ScrollBar
),
120
= DependencyProperty.Register("ViewportSize", typeof(double), typeof(
ScrollBar
),
234
public static readonly RoutedCommand LineUpCommand = new RoutedCommand("LineUp", typeof(
ScrollBar
));
238
public static readonly RoutedCommand LineDownCommand = new RoutedCommand("LineDown", typeof(
ScrollBar
));
242
public static readonly RoutedCommand LineLeftCommand = new RoutedCommand("LineLeft", typeof(
ScrollBar
));
246
public static readonly RoutedCommand LineRightCommand = new RoutedCommand("LineRight", typeof(
ScrollBar
));
250
public static readonly RoutedCommand PageUpCommand = new RoutedCommand("PageUp", typeof(
ScrollBar
));
254
public static readonly RoutedCommand PageDownCommand = new RoutedCommand("PageDown", typeof(
ScrollBar
));
258
public static readonly RoutedCommand PageLeftCommand = new RoutedCommand("PageLeft", typeof(
ScrollBar
));
262
public static readonly RoutedCommand PageRightCommand = new RoutedCommand("PageRight", typeof(
ScrollBar
));
266
public static readonly RoutedCommand ScrollToEndCommand = new RoutedCommand("ScrollToEnd", typeof(
ScrollBar
));
270
public static readonly RoutedCommand ScrollToHomeCommand = new RoutedCommand("ScrollToHome", typeof(
ScrollBar
));
274
public static readonly RoutedCommand ScrollToRightEndCommand = new RoutedCommand("ScrollToRightEnd", typeof(
ScrollBar
));
278
public static readonly RoutedCommand ScrollToLeftEndCommand = new RoutedCommand("ScrollToLeftEnd", typeof(
ScrollBar
));
282
public static readonly RoutedCommand ScrollToTopCommand = new RoutedCommand("ScrollToTop", typeof(
ScrollBar
));
286
public static readonly RoutedCommand ScrollToBottomCommand = new RoutedCommand("ScrollToBottom", typeof(
ScrollBar
));
290
public static readonly RoutedCommand ScrollToHorizontalOffsetCommand = new RoutedCommand("ScrollToHorizontalOffset", typeof(
ScrollBar
));
294
public static readonly RoutedCommand ScrollToVerticalOffsetCommand = new RoutedCommand("ScrollToVerticalOffset", typeof(
ScrollBar
));
298
public static readonly RoutedCommand DeferScrollToHorizontalOffsetCommand = new RoutedCommand("DeferScrollToToHorizontalOffset", typeof(
ScrollBar
));
302
public static readonly RoutedCommand DeferScrollToVerticalOffsetCommand = new RoutedCommand("DeferScrollToVerticalOffset", typeof(
ScrollBar
));
307
public static readonly RoutedCommand ScrollHereCommand = new RoutedCommand("ScrollHere", typeof(
ScrollBar
));
320
ScrollBar
scrollBar = sender as
ScrollBar
;
330
ScrollBar
scrollBar = sender as
ScrollBar
;
383
((
ScrollBar
)sender).OnThumbDragCompleted(e);
493
ScrollBar
scrollBar = ((
ScrollBar
)target);
494
if (args.Command ==
ScrollBar
.ScrollHereCommand)
503
if (args.Command ==
ScrollBar
.LineUpCommand)
507
else if (args.Command ==
ScrollBar
.LineDownCommand)
511
else if (args.Command ==
ScrollBar
.PageUpCommand)
515
else if (args.Command ==
ScrollBar
.PageDownCommand)
519
else if (args.Command ==
ScrollBar
.ScrollToTopCommand)
523
else if (args.Command ==
ScrollBar
.ScrollToBottomCommand)
530
if (args.Command ==
ScrollBar
.LineLeftCommand)
534
else if (args.Command ==
ScrollBar
.LineRightCommand)
538
else if (args.Command ==
ScrollBar
.PageLeftCommand)
542
else if (args.Command ==
ScrollBar
.PageRightCommand)
546
else if (args.Command ==
ScrollBar
.ScrollToLeftEndCommand)
550
else if (args.Command ==
ScrollBar
.ScrollToRightEndCommand)
661
args.CanExecute = (args.Command ==
ScrollBar
.ScrollHereCommand);
666
args.CanExecute = ((
ScrollBar
)target).IsStandalone;
691
DefaultStyleKeyProperty.OverrideMetadata(typeof(
ScrollBar
), new FrameworkPropertyMetadata(typeof(
ScrollBar
)));
692
_dType = DependencyObjectType.FromSystemTypeInternal(typeof(
ScrollBar
));
697
FocusableProperty.OverrideMetadata(typeof(
ScrollBar
), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox));
700
EventManager.RegisterClassHandler(typeof(
ScrollBar
), Thumb.DragStartedEvent, new DragStartedEventHandler(OnThumbDragStarted));
701
EventManager.RegisterClassHandler(typeof(
ScrollBar
), Thumb.DragDeltaEvent, new DragDeltaEventHandler(OnThumbDragDelta));
702
EventManager.RegisterClassHandler(typeof(
ScrollBar
), Thumb.DragCompletedEvent, new DragCompletedEventHandler(OnThumbDragCompleted));
705
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.ScrollHereCommand, onScrollCommand, new CanExecuteRoutedEventHandler(OnQueryScrollHereCommand));
707
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.LineUpCommand, onScrollCommand, onQueryScrollCommand, Key.Up);
708
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.LineDownCommand, onScrollCommand, onQueryScrollCommand, Key.Down);
709
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.PageUpCommand, onScrollCommand, onQueryScrollCommand, Key.PageUp);
710
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.PageDownCommand, onScrollCommand, onQueryScrollCommand, Key.PageDown);
711
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.Home, ModifierKeys.Control));
712
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.End, ModifierKeys.Control));
714
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.LineLeftCommand, onScrollCommand, onQueryScrollCommand, Key.Left);
715
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.LineRightCommand, onScrollCommand, onQueryScrollCommand, Key.Right);
716
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.PageLeftCommand, onScrollCommand, onQueryScrollCommand);
717
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.PageRightCommand, onScrollCommand, onQueryScrollCommand);
718
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.ScrollToLeftEndCommand, onScrollCommand, onQueryScrollCommand, Key.Home);
719
CommandHelpers.RegisterCommandHandler(typeof(
ScrollBar
),
ScrollBar
.ScrollToRightEndCommand, onScrollCommand, onQueryScrollCommand, Key.End);
721
MaximumProperty.OverrideMetadata(typeof(
ScrollBar
), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged)));
722
MinimumProperty.OverrideMetadata(typeof(
ScrollBar
), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged)));
724
ContextMenuProperty.OverrideMetadata(typeof(
ScrollBar
), new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceContextMenu)));
731
ScrollBar
scrollBar = (
ScrollBar
)d;
796
ScrollBar
sb = (
ScrollBar
)o;
849
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollHere, "ScrollHere",
ScrollBar
.ScrollHereCommand));
851
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_Top, "Top",
ScrollBar
.ScrollToTopCommand));
852
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_Bottom, "Bottom",
ScrollBar
.ScrollToBottomCommand));
854
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageUp, "PageUp",
ScrollBar
.PageUpCommand));
855
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageDown, "PageDown",
ScrollBar
.PageDownCommand));
857
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollUp, "ScrollUp",
ScrollBar
.LineUpCommand));
858
verticalContextMenu.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollDown, "ScrollDown",
ScrollBar
.LineDownCommand));
869
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollHere, "ScrollHere",
ScrollBar
.ScrollHereCommand));
871
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_LeftEdge, "LeftEdge",
ScrollBar
.ScrollToLeftEndCommand));
872
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_RightEdge, "RightEdge",
ScrollBar
.ScrollToRightEndCommand));
874
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageLeft, "PageLeft",
ScrollBar
.PageLeftCommand));
875
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageRight, "PageRight",
ScrollBar
.PageRightCommand));
877
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollLeft, "ScrollLeft",
ScrollBar
.LineLeftCommand));
878
horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollRight, "ScrollRight",
ScrollBar
.LineRightCommand));
889
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollHere, "ScrollHere",
ScrollBar
.ScrollHereCommand));
891
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_LeftEdge, "LeftEdge",
ScrollBar
.ScrollToRightEndCommand));
892
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_RightEdge, "RightEdge",
ScrollBar
.ScrollToLeftEndCommand));
894
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageLeft, "PageLeft",
ScrollBar
.PageRightCommand));
895
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_PageRight, "PageRight",
ScrollBar
.PageLeftCommand));
897
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollLeft, "ScrollLeft",
ScrollBar
.LineRightCommand));
898
horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(SRID.ScrollBar_ContextMenu_ScrollRight, "ScrollRight",
ScrollBar
.LineLeftCommand));
src\Framework\System\Windows\Controls\Primitives\ScrollEventArgs.cs (3)
10
/// <seealso cref="
ScrollBar
.ScrollEvent" />
23
RoutedEvent =
ScrollBar
.ScrollEvent;
50
/// <seealso cref="
ScrollBar
.ScrollEvent" />
src\Framework\System\Windows\Controls\Primitives\Track.cs (5)
242
new ValidateValueCallback(
ScrollBar
.IsValidOrientation));
735
ScrollBar
scrollBar = rangeBase as
ScrollBar
;
739
BindToTemplatedParent(ViewportSizeProperty,
ScrollBar
.ViewportSizeProperty);
740
BindToTemplatedParent(OrientationProperty,
ScrollBar
.OrientationProperty);
src\Framework\System\Windows\Controls\ScrollViewer.cs (48)
70
[TemplatePart(Name = "PART_HorizontalScrollBar", Type = typeof(
ScrollBar
))]
71
[TemplatePart(Name = "PART_VerticalScrollBar", Type = typeof(
ScrollBar
))]
1401
ScrollBar
scrollBar = GetTemplateChild(HorizontalScrollBarTemplateName) as
ScrollBar
;
1406
scrollBar = GetTemplateChild(VerticalScrollBarTemplateName) as
ScrollBar
;
2541
if (args.Command ==
ScrollBar
.DeferScrollToHorizontalOffsetCommand)
2545
else if (args.Command ==
ScrollBar
.DeferScrollToVerticalOffsetCommand)
2549
else if (args.Command ==
ScrollBar
.LineLeftCommand)
2553
else if (args.Command ==
ScrollBar
.LineRightCommand)
2557
else if (args.Command ==
ScrollBar
.PageLeftCommand)
2561
else if (args.Command ==
ScrollBar
.PageRightCommand)
2565
else if (args.Command ==
ScrollBar
.LineUpCommand)
2569
else if (args.Command ==
ScrollBar
.LineDownCommand)
2573
else if ( args.Command ==
ScrollBar
.PageUpCommand
2578
else if ( args.Command ==
ScrollBar
.PageDownCommand
2583
else if (args.Command ==
ScrollBar
.ScrollToEndCommand)
2587
else if (args.Command ==
ScrollBar
.ScrollToHomeCommand)
2591
else if (args.Command ==
ScrollBar
.ScrollToLeftEndCommand)
2595
else if (args.Command ==
ScrollBar
.ScrollToRightEndCommand)
2599
else if (args.Command ==
ScrollBar
.ScrollToTopCommand)
2603
else if (args.Command ==
ScrollBar
.ScrollToBottomCommand)
2607
else if (args.Command ==
ScrollBar
.ScrollToHorizontalOffsetCommand)
2611
else if (args.Command ==
ScrollBar
.ScrollToVerticalOffsetCommand)
2652
else if ((args.Command ==
ScrollBar
.DeferScrollToHorizontalOffsetCommand) ||
2653
(args.Command ==
ScrollBar
.DeferScrollToVerticalOffsetCommand))
2676
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.LineLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2677
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.LineRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2678
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.PageLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2679
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.PageRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2680
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.LineUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2681
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.LineDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2682
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.PageUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2683
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.PageDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2684
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToLeftEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2685
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToRightEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2686
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2687
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToHomeCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2688
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToTopCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2689
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToBottomCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2690
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2691
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.ScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2692
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.DeferScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2693
CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer),
ScrollBar
.DeferScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler);
2721
FrameworkElementFactory vsb = new FrameworkElementFactory(typeof(
ScrollBar
), VerticalScrollBarTemplateName);
2722
FrameworkElementFactory hsb = new FrameworkElementFactory(typeof(
ScrollBar
), HorizontalScrollBarTemplateName);
2757
hsb.SetValue(
ScrollBar
.OrientationProperty, Orientation.Horizontal);
2762
hsb.SetValue(
ScrollBar
.ViewportSizeProperty, new TemplateBindingExtension(ViewportWidthProperty));
2772
vsb.SetValue(
ScrollBar
.ViewportSizeProperty, new TemplateBindingExtension(ViewportHeightProperty));
src\Framework\System\Windows\Controls\Slider.cs (1)
285
new ValidateValueCallback(
ScrollBar
.IsValidOrientation));
src\Framework\System\Windows\Controls\Stack.cs (1)
327
new ValidateValueCallback(
ScrollBar
.IsValidOrientation));
src\Framework\System\Windows\Controls\StickyNote.cs (1)
882
if (!(args.TargetElement is
ScrollBar
))
src\Framework\System\Windows\Controls\ToolBarTray.cs (1)
107
new ValidateValueCallback(
ScrollBar
.IsValidOrientation));
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (1)
1761
new ValidateValueCallback(
ScrollBar
.IsValidOrientation));
src\Framework\System\windows\Documents\TextEditorSelection.cs (4)
658
ScrollBar
.PageDownCommand.Execute(null, This.TextView.RenderScope);
772
ScrollBar
.PageUpCommand.Execute(null, This.TextView.RenderScope);
1488
ScrollBar
.PageDownCommand.Execute(null, This.TextView.RenderScope);
1584
ScrollBar
.PageUpCommand.Execute(null, This.TextView.RenderScope);
src\Framework\System\Windows\Input\Command\CommandConverter.cs (9)
778
if (ownerType == typeof(
ScrollBar
))
783
return
ScrollBar
.LineUpCommand;
786
return
ScrollBar
.LineDownCommand;
789
return
ScrollBar
.LineLeftCommand;
792
return
ScrollBar
.LineRightCommand;
795
return
ScrollBar
.PageUpCommand;
798
return
ScrollBar
.PageDownCommand;
801
return
ScrollBar
.PageLeftCommand;
804
return
ScrollBar
.PageRightCommand;
src\Framework\System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
640
case 548: t = () => typeof(
ScrollBar
); break;
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (3)
7570
Type type = typeof(System.Windows.Controls.Primitives.
ScrollBar
);
7571
DependencyProperty dp = System.Windows.Controls.Primitives.
ScrollBar
.OrientationProperty;
7573
this.GetXamlType(typeof(System.Windows.Controls.Primitives.
ScrollBar
)), // DeclaringType
src\Framework\System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
8719
typeof(System.Windows.Controls.Primitives.
ScrollBar
),
src\Framework\System\Windows\Markup\KnownTypes.cs (1)
6092
case KnownElements.ScrollBar: t = typeof(System.Windows.Controls.Primitives.
ScrollBar
); break;
src\Framework\System\Windows\Navigation\NavigationService.cs (2)
419
if (
ScrollBar
.ScrollToTopCommand.CanExecute(null, elem))
421
ScrollBar
.ScrollToTopCommand.Execute(null, elem);