Bring Into View Requested Event
Some information relates to pre-released product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
// Register event_token BringIntoViewRequested(TypedEventHandler<UIElement, BringIntoViewRequestedEventArgs const&> const& handler) const; // Revoke with event_token void BringIntoViewRequested(event_token const* cookie) const; // Revoke with event_revoker UIElement::BringIntoViewRequested_revoker BringIntoViewRequested(auto_revoke_t, TypedEventHandler<UIElement, BringIntoViewRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<UIElement,BringIntoViewRequestedEventArgs> BringIntoViewRequested;
Public Custom Event BringIntoViewRequested As TypedEventHandler(Of UIElement, BringIntoViewRequestedEventArgs)
The framework may also raise the event in response to the element receiving focus via a keyboard or gamepad, or when an assistive technology executes the IScrollItemProvider 's ScrollIntoView method on the element's automation peer.
This event enables a control to participate in the process of bringing an element into view. It indicates to a parent control, such as a ScrollViewer, that the element which raised the event should be made visible within the scrollable region. Non-scrolling controls may use the event as a way to alter requests that originate from one of its children by modifying the event data (@"Microsoft.UI.Xaml.BringIntoViewRequestedEventArgs?text=BringIntoViewRequestedEventArgs" ). For example, you may listen to the event on a parent element to enlarge the TargetRect and ensure a minimum amount of padding is included when bringing any of its child elements into view.
In general, the event data (@"Microsoft.UI.Xaml.BringIntoViewRequestedEventArgs?text=BringIntoViewRequestedEventArgs" ) should not be marked handled. Doing so may interfere with the intended goal when StartBringIntoView was called. Other event data may be modified as the event bubbles up to alter the request. Specifically, a parent scrolling control is expected to modify the event data to account for its contribution, whether it partially or fully satisfies the request. At a minimum, a scroller is expected to set itself as the TargetElement and update the TargetRect to its own coordinate space. For situations where the element is within a scroller that itself is within a scroller each must react to satisfy the requested alignment.
BringIntoViewRequested is a routed event. For more info on the routed event concept, see Events and routed events overview.