2 instantiations of ScrollBar
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
9647DefaultConstructor = delegate () { return new System.Windows.Controls.Primitives.ScrollBar(); },
System\Windows\Markup\KnownTypes.cs (1)
1513case KnownElements.ScrollBar: o = new System.Windows.Controls.Primitives.ScrollBar(); break;
192 references to ScrollBar
PresentationFramework (192)
System\Windows\Automation\Peers\ScrollBarAutomationPeer.cs (4)
14public ScrollBarAutomationPeer(ScrollBar owner): base(owner) 46return ((ScrollBar)Owner).Orientation == Orientation.Horizontal ? 56ScrollBar sb = Owner as ScrollBar;
System\Windows\Controls\Orientation.cs (1)
8/// Examples of these elements include: <see cref="Slider" /> and <see cref="Primitives.ScrollBar" />.
System\Windows\Controls\Primitives\ScrollBar.cs (105)
58public static readonly RoutedEvent ScrollEvent = EventManager.RegisterRoutedEvent("Scroll", RoutingStrategy.Bubble, typeof(ScrollEventHandler), typeof(ScrollBar)); 92= DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ScrollBar), 101= DependencyProperty.Register("ViewportSize", typeof(double), typeof(ScrollBar), 212public static readonly RoutedCommand LineUpCommand = new RoutedCommand("LineUp", typeof(ScrollBar)); 216public static readonly RoutedCommand LineDownCommand = new RoutedCommand("LineDown", typeof(ScrollBar)); 220public static readonly RoutedCommand LineLeftCommand = new RoutedCommand("LineLeft", typeof(ScrollBar)); 224public static readonly RoutedCommand LineRightCommand = new RoutedCommand("LineRight", typeof(ScrollBar)); 228public static readonly RoutedCommand PageUpCommand = new RoutedCommand("PageUp", typeof(ScrollBar)); 232public static readonly RoutedCommand PageDownCommand = new RoutedCommand("PageDown", typeof(ScrollBar)); 236public static readonly RoutedCommand PageLeftCommand = new RoutedCommand("PageLeft", typeof(ScrollBar)); 240public static readonly RoutedCommand PageRightCommand = new RoutedCommand("PageRight", typeof(ScrollBar)); 244public static readonly RoutedCommand ScrollToEndCommand = new RoutedCommand("ScrollToEnd", typeof(ScrollBar)); 248public static readonly RoutedCommand ScrollToHomeCommand = new RoutedCommand("ScrollToHome", typeof(ScrollBar)); 252public static readonly RoutedCommand ScrollToRightEndCommand = new RoutedCommand("ScrollToRightEnd", typeof(ScrollBar)); 256public static readonly RoutedCommand ScrollToLeftEndCommand = new RoutedCommand("ScrollToLeftEnd", typeof(ScrollBar)); 260public static readonly RoutedCommand ScrollToTopCommand = new RoutedCommand("ScrollToTop", typeof(ScrollBar)); 264public static readonly RoutedCommand ScrollToBottomCommand = new RoutedCommand("ScrollToBottom", typeof(ScrollBar)); 268public static readonly RoutedCommand ScrollToHorizontalOffsetCommand = new RoutedCommand("ScrollToHorizontalOffset", typeof(ScrollBar)); 272public static readonly RoutedCommand ScrollToVerticalOffsetCommand = new RoutedCommand("ScrollToVerticalOffset", typeof(ScrollBar)); 276public static readonly RoutedCommand DeferScrollToHorizontalOffsetCommand = new RoutedCommand("DeferScrollToToHorizontalOffset", typeof(ScrollBar)); 280public static readonly RoutedCommand DeferScrollToVerticalOffsetCommand = new RoutedCommand("DeferScrollToVerticalOffset", typeof(ScrollBar)); 285public static readonly RoutedCommand ScrollHereCommand = new RoutedCommand("ScrollHere", typeof(ScrollBar)); 298ScrollBar scrollBar = sender as ScrollBar; 308ScrollBar scrollBar = sender as ScrollBar; 361((ScrollBar)sender).OnThumbDragCompleted(e); 473ScrollBar scrollBar = ((ScrollBar)target); 474if (args.Command == ScrollBar.ScrollHereCommand) 483if (args.Command == ScrollBar.LineUpCommand) 487else if (args.Command == ScrollBar.LineDownCommand) 491else if (args.Command == ScrollBar.PageUpCommand) 495else if (args.Command == ScrollBar.PageDownCommand) 499else if (args.Command == ScrollBar.ScrollToTopCommand) 503else if (args.Command == ScrollBar.ScrollToBottomCommand) 510if (args.Command == ScrollBar.LineLeftCommand) 514else if (args.Command == ScrollBar.LineRightCommand) 518else if (args.Command == ScrollBar.PageLeftCommand) 522else if (args.Command == ScrollBar.PageRightCommand) 526else if (args.Command == ScrollBar.ScrollToLeftEndCommand) 530else if (args.Command == ScrollBar.ScrollToRightEndCommand) 641args.CanExecute = (args.Command == ScrollBar.ScrollHereCommand); 646args.CanExecute = ((ScrollBar)target).IsStandalone; 671DefaultStyleKeyProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(typeof(ScrollBar))); 672_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ScrollBar)); 677FocusableProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); 680EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragStartedEvent, new DragStartedEventHandler(OnThumbDragStarted)); 681EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragDeltaEvent, new DragDeltaEventHandler(OnThumbDragDelta)); 682EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragCompletedEvent, new DragCompletedEventHandler(OnThumbDragCompleted)); 685CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollHereCommand, onScrollCommand, new CanExecuteRoutedEventHandler(OnQueryScrollHereCommand)); 687CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineUpCommand, onScrollCommand, onQueryScrollCommand, Key.Up); 688CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineDownCommand, onScrollCommand, onQueryScrollCommand, Key.Down); 689CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageUpCommand, onScrollCommand, onQueryScrollCommand, Key.PageUp); 690CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageDownCommand, onScrollCommand, onQueryScrollCommand, Key.PageDown); 691CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.Home, ModifierKeys.Control)); 692CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.End, ModifierKeys.Control)); 694CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineLeftCommand, onScrollCommand, onQueryScrollCommand, Key.Left); 695CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineRightCommand, onScrollCommand, onQueryScrollCommand, Key.Right); 696CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageLeftCommand, onScrollCommand, onQueryScrollCommand); 697CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageRightCommand, onScrollCommand, onQueryScrollCommand); 698CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToLeftEndCommand, onScrollCommand, onQueryScrollCommand, Key.Home); 699CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToRightEndCommand, onScrollCommand, onQueryScrollCommand, Key.End); 701MaximumProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged))); 702MinimumProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged))); 704ContextMenuProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceContextMenu))); 711ScrollBar scrollBar = (ScrollBar)d; 776ScrollBar sb = (ScrollBar)o; 829verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 831verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Top), "Top", ScrollBar.ScrollToTopCommand)); 832verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Bottom), "Bottom", ScrollBar.ScrollToBottomCommand)); 834verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageUp), "PageUp", ScrollBar.PageUpCommand)); 835verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageDown), "PageDown", ScrollBar.PageDownCommand)); 837verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollUp), "ScrollUp", ScrollBar.LineUpCommand)); 838verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollDown), "ScrollDown", ScrollBar.LineDownCommand)); 849horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 851horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToLeftEndCommand)); 852horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToRightEndCommand)); 854horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageLeftCommand)); 855horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageRightCommand)); 857horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineLeftCommand)); 858horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineRightCommand)); 869horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 871horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToRightEndCommand)); 872horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToLeftEndCommand)); 874horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageRightCommand)); 875horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageLeftCommand)); 877horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineRightCommand)); 878horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineLeftCommand));
System\Windows\Controls\Primitives\ScrollEventArgs.cs (3)
9/// <seealso cref="ScrollBar.ScrollEvent" /> 22RoutedEvent =ScrollBar.ScrollEvent; 49/// <seealso cref="ScrollBar.ScrollEvent" />
System\Windows\Controls\Primitives\Track.cs (5)
224new ValidateValueCallback(ScrollBar.IsValidOrientation)); 711ScrollBar scrollBar = rangeBase as ScrollBar; 715BindToTemplatedParent(ViewportSizeProperty, ScrollBar.ViewportSizeProperty); 716BindToTemplatedParent(OrientationProperty, ScrollBar.OrientationProperty);
System\Windows\Controls\ScrollViewer.cs (48)
59[TemplatePart(Name = "PART_HorizontalScrollBar", Type = typeof(ScrollBar))] 60[TemplatePart(Name = "PART_VerticalScrollBar", Type = typeof(ScrollBar))] 1366ScrollBar scrollBar = GetTemplateChild(HorizontalScrollBarTemplateName) as ScrollBar; 1370scrollBar = GetTemplateChild(VerticalScrollBarTemplateName) as ScrollBar; 2488if (args.Command == ScrollBar.DeferScrollToHorizontalOffsetCommand) 2492else if (args.Command == ScrollBar.DeferScrollToVerticalOffsetCommand) 2496else if (args.Command == ScrollBar.LineLeftCommand) 2500else if (args.Command == ScrollBar.LineRightCommand) 2504else if (args.Command == ScrollBar.PageLeftCommand) 2508else if (args.Command == ScrollBar.PageRightCommand) 2512else if (args.Command == ScrollBar.LineUpCommand) 2516else if (args.Command == ScrollBar.LineDownCommand) 2520else if ( args.Command == ScrollBar.PageUpCommand 2525else if ( args.Command == ScrollBar.PageDownCommand 2530else if (args.Command == ScrollBar.ScrollToEndCommand) 2534else if (args.Command == ScrollBar.ScrollToHomeCommand) 2538else if (args.Command == ScrollBar.ScrollToLeftEndCommand) 2542else if (args.Command == ScrollBar.ScrollToRightEndCommand) 2546else if (args.Command == ScrollBar.ScrollToTopCommand) 2550else if (args.Command == ScrollBar.ScrollToBottomCommand) 2554else if (args.Command == ScrollBar.ScrollToHorizontalOffsetCommand) 2558else if (args.Command == ScrollBar.ScrollToVerticalOffsetCommand) 2596else if ((args.Command == ScrollBar.DeferScrollToHorizontalOffsetCommand) || 2597(args.Command == ScrollBar.DeferScrollToVerticalOffsetCommand)) 2620CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2621CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2622CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2623CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2624CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2625CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2626CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2627CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2628CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToLeftEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2629CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToRightEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2630CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2631CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToHomeCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2632CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToTopCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2633CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToBottomCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2634CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2635CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2636CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.DeferScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2637CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.DeferScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2665FrameworkElementFactory vsb = new FrameworkElementFactory(typeof(ScrollBar), VerticalScrollBarTemplateName); 2666FrameworkElementFactory hsb = new FrameworkElementFactory(typeof(ScrollBar), HorizontalScrollBarTemplateName); 2705hsb.SetValue(ScrollBar.OrientationProperty, Orientation.Horizontal); 2710hsb.SetValue(ScrollBar.ViewportSizeProperty, new TemplateBindingExtension(ViewportWidthProperty)); 2720vsb.SetValue(ScrollBar.ViewportSizeProperty, new TemplateBindingExtension(ViewportHeightProperty));
System\Windows\Controls\Slider.cs (1)
253new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\Stack.cs (1)
310new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\StickyNote.cs (1)
836if (!(args.TargetElement is ScrollBar))
System\Windows\Controls\ToolBarTray.cs (1)
97new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\VirtualizingStackPanel.cs (1)
1794new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\windows\Documents\TextEditorSelection.cs (4)
633ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 747ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 1463ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 1559ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope);
System\Windows\Input\Command\CommandConverter.cs (9)
758if (ownerType == typeof(ScrollBar)) 763return ScrollBar.LineUpCommand; 766return ScrollBar.LineDownCommand; 769return ScrollBar.LineLeftCommand; 772return ScrollBar.LineRightCommand; 775return ScrollBar.PageUpCommand; 778return ScrollBar.PageDownCommand; 781return ScrollBar.PageLeftCommand; 784return ScrollBar.PageRightCommand;
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
641case 548: t = () => typeof(ScrollBar); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (3)
8213Type type = typeof(System.Windows.Controls.Primitives.ScrollBar); 8214DependencyProperty dp = System.Windows.Controls.Primitives.ScrollBar.OrientationProperty; 8216this.GetXamlType(typeof(System.Windows.Controls.Primitives.ScrollBar)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
9644typeof(System.Windows.Controls.Primitives.ScrollBar),
System\Windows\Markup\KnownTypes.cs (1)
6095case KnownElements.ScrollBar: t = typeof(System.Windows.Controls.Primitives.ScrollBar); break;
System\Windows\Navigation\NavigationService.cs (2)
372if (ScrollBar.ScrollToTopCommand.CanExecute(null, elem)) 374ScrollBar.ScrollToTopCommand.Execute(null, elem);