2 instantiations of ScrollBar
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
9648DefaultConstructor = delegate () { return new System.Windows.Controls.Primitives.ScrollBar(); },
System\Windows\Markup\KnownTypes.cs (1)
1514case KnownElements.ScrollBar: o = new System.Windows.Controls.Primitives.ScrollBar(); break;
192 references to ScrollBar
PresentationFramework (192)
System\Windows\Automation\Peers\ScrollBarAutomationPeer.cs (4)
15public ScrollBarAutomationPeer(ScrollBar owner): base(owner) 47return ((ScrollBar)Owner).Orientation == Orientation.Horizontal ? 57ScrollBar sb = Owner as ScrollBar;
System\Windows\Controls\Orientation.cs (1)
9/// Examples of these elements include: <see cref="Slider" /> and <see cref="Primitives.ScrollBar" />.
System\Windows\Controls\Primitives\ScrollBar.cs (105)
59public static readonly RoutedEvent ScrollEvent = EventManager.RegisterRoutedEvent("Scroll", RoutingStrategy.Bubble, typeof(ScrollEventHandler), typeof(ScrollBar)); 93= DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ScrollBar), 102= DependencyProperty.Register("ViewportSize", typeof(double), typeof(ScrollBar), 213public static readonly RoutedCommand LineUpCommand = new RoutedCommand("LineUp", typeof(ScrollBar)); 217public static readonly RoutedCommand LineDownCommand = new RoutedCommand("LineDown", typeof(ScrollBar)); 221public static readonly RoutedCommand LineLeftCommand = new RoutedCommand("LineLeft", typeof(ScrollBar)); 225public static readonly RoutedCommand LineRightCommand = new RoutedCommand("LineRight", typeof(ScrollBar)); 229public static readonly RoutedCommand PageUpCommand = new RoutedCommand("PageUp", typeof(ScrollBar)); 233public static readonly RoutedCommand PageDownCommand = new RoutedCommand("PageDown", typeof(ScrollBar)); 237public static readonly RoutedCommand PageLeftCommand = new RoutedCommand("PageLeft", typeof(ScrollBar)); 241public static readonly RoutedCommand PageRightCommand = new RoutedCommand("PageRight", typeof(ScrollBar)); 245public static readonly RoutedCommand ScrollToEndCommand = new RoutedCommand("ScrollToEnd", typeof(ScrollBar)); 249public static readonly RoutedCommand ScrollToHomeCommand = new RoutedCommand("ScrollToHome", typeof(ScrollBar)); 253public static readonly RoutedCommand ScrollToRightEndCommand = new RoutedCommand("ScrollToRightEnd", typeof(ScrollBar)); 257public static readonly RoutedCommand ScrollToLeftEndCommand = new RoutedCommand("ScrollToLeftEnd", typeof(ScrollBar)); 261public static readonly RoutedCommand ScrollToTopCommand = new RoutedCommand("ScrollToTop", typeof(ScrollBar)); 265public static readonly RoutedCommand ScrollToBottomCommand = new RoutedCommand("ScrollToBottom", typeof(ScrollBar)); 269public static readonly RoutedCommand ScrollToHorizontalOffsetCommand = new RoutedCommand("ScrollToHorizontalOffset", typeof(ScrollBar)); 273public static readonly RoutedCommand ScrollToVerticalOffsetCommand = new RoutedCommand("ScrollToVerticalOffset", typeof(ScrollBar)); 277public static readonly RoutedCommand DeferScrollToHorizontalOffsetCommand = new RoutedCommand("DeferScrollToToHorizontalOffset", typeof(ScrollBar)); 281public static readonly RoutedCommand DeferScrollToVerticalOffsetCommand = new RoutedCommand("DeferScrollToVerticalOffset", typeof(ScrollBar)); 286public static readonly RoutedCommand ScrollHereCommand = new RoutedCommand("ScrollHere", typeof(ScrollBar)); 299ScrollBar scrollBar = sender as ScrollBar; 309ScrollBar scrollBar = sender as ScrollBar; 362((ScrollBar)sender).OnThumbDragCompleted(e); 474ScrollBar scrollBar = ((ScrollBar)target); 475if (args.Command == ScrollBar.ScrollHereCommand) 484if (args.Command == ScrollBar.LineUpCommand) 488else if (args.Command == ScrollBar.LineDownCommand) 492else if (args.Command == ScrollBar.PageUpCommand) 496else if (args.Command == ScrollBar.PageDownCommand) 500else if (args.Command == ScrollBar.ScrollToTopCommand) 504else if (args.Command == ScrollBar.ScrollToBottomCommand) 511if (args.Command == ScrollBar.LineLeftCommand) 515else if (args.Command == ScrollBar.LineRightCommand) 519else if (args.Command == ScrollBar.PageLeftCommand) 523else if (args.Command == ScrollBar.PageRightCommand) 527else if (args.Command == ScrollBar.ScrollToLeftEndCommand) 531else if (args.Command == ScrollBar.ScrollToRightEndCommand) 642args.CanExecute = (args.Command == ScrollBar.ScrollHereCommand); 647args.CanExecute = ((ScrollBar)target).IsStandalone; 672DefaultStyleKeyProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(typeof(ScrollBar))); 673_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ScrollBar)); 678FocusableProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); 681EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragStartedEvent, new DragStartedEventHandler(OnThumbDragStarted)); 682EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragDeltaEvent, new DragDeltaEventHandler(OnThumbDragDelta)); 683EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragCompletedEvent, new DragCompletedEventHandler(OnThumbDragCompleted)); 686CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollHereCommand, onScrollCommand, new CanExecuteRoutedEventHandler(OnQueryScrollHereCommand)); 688CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineUpCommand, onScrollCommand, onQueryScrollCommand, Key.Up); 689CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineDownCommand, onScrollCommand, onQueryScrollCommand, Key.Down); 690CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageUpCommand, onScrollCommand, onQueryScrollCommand, Key.PageUp); 691CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageDownCommand, onScrollCommand, onQueryScrollCommand, Key.PageDown); 692CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.Home, ModifierKeys.Control)); 693CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.End, ModifierKeys.Control)); 695CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineLeftCommand, onScrollCommand, onQueryScrollCommand, Key.Left); 696CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineRightCommand, onScrollCommand, onQueryScrollCommand, Key.Right); 697CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageLeftCommand, onScrollCommand, onQueryScrollCommand); 698CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageRightCommand, onScrollCommand, onQueryScrollCommand); 699CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToLeftEndCommand, onScrollCommand, onQueryScrollCommand, Key.Home); 700CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToRightEndCommand, onScrollCommand, onQueryScrollCommand, Key.End); 702MaximumProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged))); 703MinimumProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged))); 705ContextMenuProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceContextMenu))); 712ScrollBar scrollBar = (ScrollBar)d; 777ScrollBar sb = (ScrollBar)o; 830verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 832verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Top), "Top", ScrollBar.ScrollToTopCommand)); 833verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Bottom), "Bottom", ScrollBar.ScrollToBottomCommand)); 835verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageUp), "PageUp", ScrollBar.PageUpCommand)); 836verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageDown), "PageDown", ScrollBar.PageDownCommand)); 838verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollUp), "ScrollUp", ScrollBar.LineUpCommand)); 839verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollDown), "ScrollDown", ScrollBar.LineDownCommand)); 850horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 852horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToLeftEndCommand)); 853horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToRightEndCommand)); 855horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageLeftCommand)); 856horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageRightCommand)); 858horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineLeftCommand)); 859horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineRightCommand)); 870horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 872horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToRightEndCommand)); 873horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToLeftEndCommand)); 875horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageRightCommand)); 876horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageLeftCommand)); 878horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineRightCommand)); 879horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineLeftCommand));
System\Windows\Controls\Primitives\ScrollEventArgs.cs (3)
10/// <seealso cref="ScrollBar.ScrollEvent" /> 23RoutedEvent =ScrollBar.ScrollEvent; 50/// <seealso cref="ScrollBar.ScrollEvent" />
System\Windows\Controls\Primitives\Track.cs (5)
229new ValidateValueCallback(ScrollBar.IsValidOrientation)); 726ScrollBar scrollBar = rangeBase as ScrollBar; 730BindToTemplatedParent(ViewportSizeProperty, ScrollBar.ViewportSizeProperty); 731BindToTemplatedParent(OrientationProperty, ScrollBar.OrientationProperty);
System\Windows\Controls\ScrollViewer.cs (48)
60[TemplatePart(Name = "PART_HorizontalScrollBar", Type = typeof(ScrollBar))] 61[TemplatePart(Name = "PART_VerticalScrollBar", Type = typeof(ScrollBar))] 1367ScrollBar scrollBar = GetTemplateChild(HorizontalScrollBarTemplateName) as ScrollBar; 1372scrollBar = GetTemplateChild(VerticalScrollBarTemplateName) as ScrollBar; 2497if (args.Command == ScrollBar.DeferScrollToHorizontalOffsetCommand) 2501else if (args.Command == ScrollBar.DeferScrollToVerticalOffsetCommand) 2505else if (args.Command == ScrollBar.LineLeftCommand) 2509else if (args.Command == ScrollBar.LineRightCommand) 2513else if (args.Command == ScrollBar.PageLeftCommand) 2517else if (args.Command == ScrollBar.PageRightCommand) 2521else if (args.Command == ScrollBar.LineUpCommand) 2525else if (args.Command == ScrollBar.LineDownCommand) 2529else if ( args.Command == ScrollBar.PageUpCommand 2534else if ( args.Command == ScrollBar.PageDownCommand 2539else if (args.Command == ScrollBar.ScrollToEndCommand) 2543else if (args.Command == ScrollBar.ScrollToHomeCommand) 2547else if (args.Command == ScrollBar.ScrollToLeftEndCommand) 2551else if (args.Command == ScrollBar.ScrollToRightEndCommand) 2555else if (args.Command == ScrollBar.ScrollToTopCommand) 2559else if (args.Command == ScrollBar.ScrollToBottomCommand) 2563else if (args.Command == ScrollBar.ScrollToHorizontalOffsetCommand) 2567else if (args.Command == ScrollBar.ScrollToVerticalOffsetCommand) 2608else if ((args.Command == ScrollBar.DeferScrollToHorizontalOffsetCommand) || 2609(args.Command == ScrollBar.DeferScrollToVerticalOffsetCommand)) 2632CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2633CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2634CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2635CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2636CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2637CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2638CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2639CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2640CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToLeftEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2641CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToRightEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2642CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2643CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToHomeCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2644CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToTopCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2645CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToBottomCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2646CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2647CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2648CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.DeferScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2649CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.DeferScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2677FrameworkElementFactory vsb = new FrameworkElementFactory(typeof(ScrollBar), VerticalScrollBarTemplateName); 2678FrameworkElementFactory hsb = new FrameworkElementFactory(typeof(ScrollBar), HorizontalScrollBarTemplateName); 2717hsb.SetValue(ScrollBar.OrientationProperty, Orientation.Horizontal); 2722hsb.SetValue(ScrollBar.ViewportSizeProperty, new TemplateBindingExtension(ViewportWidthProperty)); 2732vsb.SetValue(ScrollBar.ViewportSizeProperty, new TemplateBindingExtension(ViewportHeightProperty));
System\Windows\Controls\Slider.cs (1)
272new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\Stack.cs (1)
311new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\StickyNote.cs (1)
845if (!(args.TargetElement is ScrollBar))
System\Windows\Controls\ToolBarTray.cs (1)
98new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\VirtualizingStackPanel.cs (1)
1801new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\windows\Documents\TextEditorSelection.cs (4)
634ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 748ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 1464ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 1560ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope);
System\Windows\Input\Command\CommandConverter.cs (9)
759if (ownerType == typeof(ScrollBar)) 764return ScrollBar.LineUpCommand; 767return ScrollBar.LineDownCommand; 770return ScrollBar.LineLeftCommand; 773return ScrollBar.LineRightCommand; 776return ScrollBar.PageUpCommand; 779return ScrollBar.PageDownCommand; 782return ScrollBar.PageLeftCommand; 785return ScrollBar.PageRightCommand;
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
642case 548: t = () => typeof(ScrollBar); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (3)
8214Type type = typeof(System.Windows.Controls.Primitives.ScrollBar); 8215DependencyProperty dp = System.Windows.Controls.Primitives.ScrollBar.OrientationProperty; 8217this.GetXamlType(typeof(System.Windows.Controls.Primitives.ScrollBar)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
9645typeof(System.Windows.Controls.Primitives.ScrollBar),
System\Windows\Markup\KnownTypes.cs (1)
6096case KnownElements.ScrollBar: t = typeof(System.Windows.Controls.Primitives.ScrollBar); break;
System\Windows\Navigation\NavigationService.cs (2)
373if (ScrollBar.ScrollToTopCommand.CanExecute(null, elem)) 375ScrollBar.ScrollToTopCommand.Execute(null, elem);