RequestBringIntoViewEventHandler Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the method that will handle the RequestBringIntoView routed event.
public delegate void RequestBringIntoViewEventHandler(System::Object ^ sender, RequestBringIntoViewEventArgs ^ e);
public delegate void RequestBringIntoViewEventHandler(object sender, RequestBringIntoViewEventArgs e);
type RequestBringIntoViewEventHandler = delegate of obj * RequestBringIntoViewEventArgs -> unit
Public Delegate Sub RequestBringIntoViewEventHandler(sender As Object, e As RequestBringIntoViewEventArgs)
Parameters
- sender
- Object
The object where the event handler is attached.
The event data.
Remarks
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.
Extension Methods
GetMethodInfo(Delegate) |
Gets an object that represents the method represented by the specified delegate. |