Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 4
System.Windows
 RequestBringIntoViewEventHandler De...
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2010/.NET Framework 4

Other versions are also available for the following:
.NET Framework Class Library
RequestBringIntoViewEventHandler Delegate

Represents the method that will handle the FrameworkElement..::.RequestBringIntoView routed event.

Namespace:  System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)
Visual Basic
Public Delegate Sub RequestBringIntoViewEventHandler ( _
    sender As Object, _
    e As RequestBringIntoViewEventArgs _
)
C#
public delegate void RequestBringIntoViewEventHandler(
    Object sender,
    RequestBringIntoViewEventArgs e
)
Visual C++
public delegate void RequestBringIntoViewEventHandler(
    Object^ sender, 
    RequestBringIntoViewEventArgs^ e
)
F#
type RequestBringIntoViewEventHandler = 
    delegate of 
        sender:Object * 
        e:RequestBringIntoViewEventArgs -> unit

Parameters

sender
Type: System..::.Object
The object where the event handler is attached.
e
Type: System.Windows..::.RequestBringIntoViewEventArgs
The event data.

Handling this event is typically only done within elements that support a scrollable region, or otherwise deliberately set their rendering size smaller than the combined desired size of their child element content, and is only done by deliberately handling the event once it has routed upwards in the element tree and has reached the first parent that offers scrolling region support. An existing implementation that handles scrolling regions in a manner that is typically desirable for user controls is ScrollViewer. If you derive from ScrollViewer, you can register a class handler for FrameworkElement..::.RequestBringIntoView and supplement the base class handling of the event. You should also consider using or class-handling the class-defined ScrollChanged event instead of FrameworkElement..::.RequestBringIntoView. Alternatively, if you create an entirely custom class that does not derive from ScrollViewer, you can still add class handling by calling EventManager..::.RegisterClassHandler in your class instantiation. For details on class handling, see Marking Routed Events as Handled, and Class Handling.

Content elements can cause the event to be raised by their content hosts (through calling BringIntoView and raising FrameworkElement..::.RequestBringIntoView from the content host). Similarly, you can request logical tree elements to be brought into view with the helper method LogicalTreeHelper..::.BringIntoView.

A ListBox implements a related but different method ScrollIntoView.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker