UIElement.RegisterAsScrollPort(UIElement) UIElement.RegisterAsScrollPort(UIElement) UIElement.RegisterAsScrollPort(UIElement) UIElement.RegisterAsScrollPort(UIElement) Method

Definition

Registers an element as representing a scrollable viewport.

public : static void RegisterAsScrollPort(UIElement element)
static void RegisterAsScrollPort(UIElement element) const;
public static void RegisterAsScrollPort(UIElement element)
Public Shared Sub RegisterAsScrollPort(element As UIElement)
Parameters
element
UIElement UIElement UIElement UIElement

The element to register as a scrollable viewport.

Additional features and requirements
Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Remarks

This method is intended for use by custom controls that do not use the platform's native controls to display a scrollable area containing other XAML elements. For example, a custom scrolling control that relies on InteractionTracker. 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 such as when rendering 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

  • P:Windows.UI.Xaml.Controls.Control.UseSystemFocusVisuals * T:Windows.UI.Composition.Interactions.InteractionTracker