2 instantiations of ScrollBar
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
8725bamlType.DefaultConstructor = delegate() { return new System.Windows.Controls.Primitives.ScrollBar(); };
System\Windows\Markup\KnownTypes.cs (1)
1520case KnownElements.ScrollBar: o = new System.Windows.Controls.Primitives.ScrollBar(); break;
192 references to ScrollBar
PresentationFramework (192)
System\Windows\Automation\Peers\ScrollBarAutomationPeer.cs (4)
21public ScrollBarAutomationPeer(ScrollBar owner): base(owner) 53return ((ScrollBar)Owner).Orientation == Orientation.Horizontal ? 63ScrollBar sb = Owner as ScrollBar;
System\Windows\Controls\Orientation.cs (1)
12/// Examples of these elements include: <see cref="Slider" /> and <see cref="Primitives.ScrollBar" />.
System\Windows\Controls\Primitives\ScrollBar.cs (105)
75public static readonly RoutedEvent ScrollEvent = EventManager.RegisterRoutedEvent("Scroll", RoutingStrategy.Bubble, typeof(ScrollEventHandler), typeof(ScrollBar)); 109= DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ScrollBar), 118= DependencyProperty.Register("ViewportSize", typeof(double), typeof(ScrollBar), 229public static readonly RoutedCommand LineUpCommand = new RoutedCommand("LineUp", typeof(ScrollBar)); 233public static readonly RoutedCommand LineDownCommand = new RoutedCommand("LineDown", typeof(ScrollBar)); 237public static readonly RoutedCommand LineLeftCommand = new RoutedCommand("LineLeft", typeof(ScrollBar)); 241public static readonly RoutedCommand LineRightCommand = new RoutedCommand("LineRight", typeof(ScrollBar)); 245public static readonly RoutedCommand PageUpCommand = new RoutedCommand("PageUp", typeof(ScrollBar)); 249public static readonly RoutedCommand PageDownCommand = new RoutedCommand("PageDown", typeof(ScrollBar)); 253public static readonly RoutedCommand PageLeftCommand = new RoutedCommand("PageLeft", typeof(ScrollBar)); 257public static readonly RoutedCommand PageRightCommand = new RoutedCommand("PageRight", typeof(ScrollBar)); 261public static readonly RoutedCommand ScrollToEndCommand = new RoutedCommand("ScrollToEnd", typeof(ScrollBar)); 265public static readonly RoutedCommand ScrollToHomeCommand = new RoutedCommand("ScrollToHome", typeof(ScrollBar)); 269public static readonly RoutedCommand ScrollToRightEndCommand = new RoutedCommand("ScrollToRightEnd", typeof(ScrollBar)); 273public static readonly RoutedCommand ScrollToLeftEndCommand = new RoutedCommand("ScrollToLeftEnd", typeof(ScrollBar)); 277public static readonly RoutedCommand ScrollToTopCommand = new RoutedCommand("ScrollToTop", typeof(ScrollBar)); 281public static readonly RoutedCommand ScrollToBottomCommand = new RoutedCommand("ScrollToBottom", typeof(ScrollBar)); 285public static readonly RoutedCommand ScrollToHorizontalOffsetCommand = new RoutedCommand("ScrollToHorizontalOffset", typeof(ScrollBar)); 289public static readonly RoutedCommand ScrollToVerticalOffsetCommand = new RoutedCommand("ScrollToVerticalOffset", typeof(ScrollBar)); 293public static readonly RoutedCommand DeferScrollToHorizontalOffsetCommand = new RoutedCommand("DeferScrollToToHorizontalOffset", typeof(ScrollBar)); 297public static readonly RoutedCommand DeferScrollToVerticalOffsetCommand = new RoutedCommand("DeferScrollToVerticalOffset", typeof(ScrollBar)); 302public static readonly RoutedCommand ScrollHereCommand = new RoutedCommand("ScrollHere", typeof(ScrollBar)); 315ScrollBar scrollBar = sender as ScrollBar; 325ScrollBar scrollBar = sender as ScrollBar; 378((ScrollBar)sender).OnThumbDragCompleted(e); 488ScrollBar scrollBar = ((ScrollBar)target); 489if (args.Command == ScrollBar.ScrollHereCommand) 498if (args.Command == ScrollBar.LineUpCommand) 502else if (args.Command == ScrollBar.LineDownCommand) 506else if (args.Command == ScrollBar.PageUpCommand) 510else if (args.Command == ScrollBar.PageDownCommand) 514else if (args.Command == ScrollBar.ScrollToTopCommand) 518else if (args.Command == ScrollBar.ScrollToBottomCommand) 525if (args.Command == ScrollBar.LineLeftCommand) 529else if (args.Command == ScrollBar.LineRightCommand) 533else if (args.Command == ScrollBar.PageLeftCommand) 537else if (args.Command == ScrollBar.PageRightCommand) 541else if (args.Command == ScrollBar.ScrollToLeftEndCommand) 545else if (args.Command == ScrollBar.ScrollToRightEndCommand) 656args.CanExecute = (args.Command == ScrollBar.ScrollHereCommand); 661args.CanExecute = ((ScrollBar)target).IsStandalone; 686DefaultStyleKeyProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(typeof(ScrollBar))); 687_dType = DependencyObjectType.FromSystemTypeInternal(typeof(ScrollBar)); 692FocusableProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); 695EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragStartedEvent, new DragStartedEventHandler(OnThumbDragStarted)); 696EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragDeltaEvent, new DragDeltaEventHandler(OnThumbDragDelta)); 697EventManager.RegisterClassHandler(typeof(ScrollBar), Thumb.DragCompletedEvent, new DragCompletedEventHandler(OnThumbDragCompleted)); 700CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollHereCommand, onScrollCommand, new CanExecuteRoutedEventHandler(OnQueryScrollHereCommand)); 702CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineUpCommand, onScrollCommand, onQueryScrollCommand, Key.Up); 703CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineDownCommand, onScrollCommand, onQueryScrollCommand, Key.Down); 704CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageUpCommand, onScrollCommand, onQueryScrollCommand, Key.PageUp); 705CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageDownCommand, onScrollCommand, onQueryScrollCommand, Key.PageDown); 706CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToTopCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.Home, ModifierKeys.Control)); 707CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToBottomCommand, onScrollCommand, onQueryScrollCommand, new KeyGesture(Key.End, ModifierKeys.Control)); 709CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineLeftCommand, onScrollCommand, onQueryScrollCommand, Key.Left); 710CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.LineRightCommand, onScrollCommand, onQueryScrollCommand, Key.Right); 711CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageLeftCommand, onScrollCommand, onQueryScrollCommand); 712CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.PageRightCommand, onScrollCommand, onQueryScrollCommand); 713CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToLeftEndCommand, onScrollCommand, onQueryScrollCommand, Key.Home); 714CommandHelpers.RegisterCommandHandler(typeof(ScrollBar), ScrollBar.ScrollToRightEndCommand, onScrollCommand, onQueryScrollCommand, Key.End); 716MaximumProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged))); 717MinimumProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(new PropertyChangedCallback(ViewChanged))); 719ContextMenuProperty.OverrideMetadata(typeof(ScrollBar), new FrameworkPropertyMetadata(null, new CoerceValueCallback(CoerceContextMenu))); 726ScrollBar scrollBar = (ScrollBar)d; 791ScrollBar sb = (ScrollBar)o; 844verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 846verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Top), "Top", ScrollBar.ScrollToTopCommand)); 847verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_Bottom), "Bottom", ScrollBar.ScrollToBottomCommand)); 849verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageUp), "PageUp", ScrollBar.PageUpCommand)); 850verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageDown), "PageDown", ScrollBar.PageDownCommand)); 852verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollUp), "ScrollUp", ScrollBar.LineUpCommand)); 853verticalContextMenu.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollDown), "ScrollDown", ScrollBar.LineDownCommand)); 864horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 866horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToLeftEndCommand)); 867horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToRightEndCommand)); 869horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageLeftCommand)); 870horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageRightCommand)); 872horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineLeftCommand)); 873horizontalContextMenuLeftToRight.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineRightCommand)); 884horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollHere), "ScrollHere", ScrollBar.ScrollHereCommand)); 886horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_LeftEdge), "LeftEdge", ScrollBar.ScrollToRightEndCommand)); 887horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_RightEdge), "RightEdge", ScrollBar.ScrollToLeftEndCommand)); 889horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageLeft), "PageLeft", ScrollBar.PageRightCommand)); 890horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_PageRight), "PageRight", ScrollBar.PageLeftCommand)); 892horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollLeft), "ScrollLeft", ScrollBar.LineRightCommand)); 893horizontalContextMenuRightToLeft.Items.Add(CreateMenuItem(nameof(SR.ScrollBar_ContextMenu_ScrollRight), "ScrollRight", ScrollBar.LineLeftCommand));
System\Windows\Controls\Primitives\ScrollEventArgs.cs (3)
14/// <seealso cref="ScrollBar.ScrollEvent" /> 27RoutedEvent =ScrollBar.ScrollEvent; 54/// <seealso cref="ScrollBar.ScrollEvent" />
System\Windows\Controls\Primitives\Track.cs (5)
240new ValidateValueCallback(ScrollBar.IsValidOrientation)); 733ScrollBar scrollBar = rangeBase as ScrollBar; 737BindToTemplatedParent(ViewportSizeProperty, ScrollBar.ViewportSizeProperty); 738BindToTemplatedParent(OrientationProperty, ScrollBar.OrientationProperty);
System\Windows\Controls\ScrollViewer.cs (48)
68[TemplatePart(Name = "PART_HorizontalScrollBar", Type = typeof(ScrollBar))] 69[TemplatePart(Name = "PART_VerticalScrollBar", Type = typeof(ScrollBar))] 1373ScrollBar scrollBar = GetTemplateChild(HorizontalScrollBarTemplateName) as ScrollBar; 1378scrollBar = GetTemplateChild(VerticalScrollBarTemplateName) as ScrollBar; 2501if (args.Command == ScrollBar.DeferScrollToHorizontalOffsetCommand) 2505else if (args.Command == ScrollBar.DeferScrollToVerticalOffsetCommand) 2509else if (args.Command == ScrollBar.LineLeftCommand) 2513else if (args.Command == ScrollBar.LineRightCommand) 2517else if (args.Command == ScrollBar.PageLeftCommand) 2521else if (args.Command == ScrollBar.PageRightCommand) 2525else if (args.Command == ScrollBar.LineUpCommand) 2529else if (args.Command == ScrollBar.LineDownCommand) 2533else if ( args.Command == ScrollBar.PageUpCommand 2538else if ( args.Command == ScrollBar.PageDownCommand 2543else if (args.Command == ScrollBar.ScrollToEndCommand) 2547else if (args.Command == ScrollBar.ScrollToHomeCommand) 2551else if (args.Command == ScrollBar.ScrollToLeftEndCommand) 2555else if (args.Command == ScrollBar.ScrollToRightEndCommand) 2559else if (args.Command == ScrollBar.ScrollToTopCommand) 2563else if (args.Command == ScrollBar.ScrollToBottomCommand) 2567else if (args.Command == ScrollBar.ScrollToHorizontalOffsetCommand) 2571else if (args.Command == ScrollBar.ScrollToVerticalOffsetCommand) 2612else if ((args.Command == ScrollBar.DeferScrollToHorizontalOffsetCommand) || 2613(args.Command == ScrollBar.DeferScrollToVerticalOffsetCommand)) 2636CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2637CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2638CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageLeftCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2639CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageRightCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2640CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2641CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.LineDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2642CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageUpCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2643CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.PageDownCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2644CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToLeftEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2645CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToRightEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2646CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToEndCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2647CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToHomeCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2648CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToTopCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2649CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToBottomCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2650CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2651CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.ScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2652CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.DeferScrollToHorizontalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2653CommandHelpers.RegisterCommandHandler(typeof(ScrollViewer), ScrollBar.DeferScrollToVerticalOffsetCommand, executeScrollCommandEventHandler, canExecuteScrollCommandEventHandler); 2681FrameworkElementFactory vsb = new FrameworkElementFactory(typeof(ScrollBar), VerticalScrollBarTemplateName); 2682FrameworkElementFactory 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)
283new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\Stack.cs (1)
321new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\StickyNote.cs (1)
872if (!(args.TargetElement is ScrollBar))
System\Windows\Controls\ToolBarTray.cs (1)
106new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\Windows\Controls\VirtualizingStackPanel.cs (1)
1810new ValidateValueCallback(ScrollBar.IsValidOrientation));
System\windows\Documents\TextEditorSelection.cs (4)
649ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 763ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 1479ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 1575ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope);
System\Windows\Input\Command\CommandConverter.cs (9)
764if (ownerType == typeof(ScrollBar)) 769return ScrollBar.LineUpCommand; 772return ScrollBar.LineDownCommand; 775return ScrollBar.LineLeftCommand; 778return ScrollBar.LineRightCommand; 781return ScrollBar.PageUpCommand; 784return ScrollBar.PageDownCommand; 787return ScrollBar.PageLeftCommand; 790return ScrollBar.PageRightCommand;
System\Windows\Markup\Baml2006\Baml2006KnownTypes.cs (1)
644case 548: t = () => typeof(ScrollBar); break;
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (3)
7612Type type = typeof(System.Windows.Controls.Primitives.ScrollBar); 7613DependencyProperty dp = System.Windows.Controls.Primitives.ScrollBar.OrientationProperty; 7615this.GetXamlType(typeof(System.Windows.Controls.Primitives.ScrollBar)), // DeclaringType
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
8723typeof(System.Windows.Controls.Primitives.ScrollBar),
System\Windows\Markup\KnownTypes.cs (1)
6102case KnownElements.ScrollBar: t = typeof(System.Windows.Controls.Primitives.ScrollBar); break;
System\Windows\Navigation\NavigationService.cs (2)
389if (ScrollBar.ScrollToTopCommand.CanExecute(null, elem)) 391ScrollBar.ScrollToTopCommand.Execute(null, elem);