Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 1.92 KB

uielement_registerasscrollport_1539448450.md

File metadata and controls

40 lines (23 loc) · 1.92 KB
-api-id -api-type
M:Microsoft.UI.Xaml.UIElement.RegisterAsScrollPort(Microsoft.UI.Xaml.UIElement)
winrt method

Microsoft.UI.Xaml.UIElement.RegisterAsScrollPort

-description

Registers an element as representing a scrollable viewport.

-parameters

-param element

The element to register as a scrollable viewport.

-remarks

This method informs the framework that the element's applied clip (either due to layout or an explicitly assigned Clip) is acting as a viewport and should receive special consideration.

This method is intended for use by custom controls that do not use the platform's native controls to display a scrollable area. For example, a custom scrolling control could be built using InteractionTracker.

Effective Viewport

The Clip of the registered element is recognized by the framework as the bounds of a viewport, which will be used in calculating the property values for the EffectiveViewportChanged event.

System Focus Visuals

By default, the focus visual is fully rendered around the outside of the focused element taking into account all clips. When an element is only partially visible within a viewport the framework needs to disambiguate which clip in the element's ancestor chain represents the viewport. The framework uses this knowledge to correctly apply the viewport clip to the rendered focus visual.

-see-also

UseSystemFocusVisuals, InteractionTracker, EffectiveViewportChanged, InvalidateViewport

-examples