Page Anchors
Last updated
Last updated
Page Anchors allow navigation directly to specific elements on a new page during page navigation. This feature enhances user experience by allowing deep linking into a specific part of a new page immediately upon navigation.
A page GUID: 5f4ef280-d58f-4c32-904d-49ef5e9904d7
A query parameter: PersonId=1
An anchor fragment: #test
Upon navigation, the page will automatically scroll to the element named test
.
To define a scrollable target on your page, set the x:Name
attribute on the element you want to anchor to.
Example:
In this example, the element named test
will be the target for the anchor scroll.
You can specify anchor scrolling options using PushPageParameters
and AnchorScrollParameters
.
AnchorId
string
The name assigned to the scrollable target.
Animated
bool
Specifies whether the scroll should be animated.
Delay
int
The number of seconds to delay before scrolling to the target.
Position
string
The final position of the target after scrolling.
Start - Scroll so the element aligns to the start (top) of the screen.
Center - Scroll so the element aligns to the center of the screen.
End - Scroll so the element aligns to the end (bottom) of the screen.