question

JohnMartel-4927 avatar image
0 Votes"
JohnMartel-4927 asked AryaDing-MSFT commented

Which is the best Navigation control to use to have items wrap around when they exceed width of app?

What would be the best navigation control to use to have its items wrap around when they exceed the width of the app. Basically much like a TabControl in WPF. Pivot seemed like a possible option, but i couldnt find a "wrap" property for the PivotItems also Windows Developer documentation recommended no using Pivot because it will no longer be supported. Thanks in advance

windows-uwpwindows-uwp-xaml
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AryaDing-MSFT avatar image
0 Votes"
AryaDing-MSFT answered AryaDing-MSFT commented

Hi,

Welcome to Microsoft Q&A!

You mean that your items exceed width of app, right? It is not recommended to use Pivot, you need to avoid using more than 5 headers when using carousel mode, as looping more than 5 can become confusing.

I suggest you could use NavigationView to instead of Pivot, NavigationView automatically adapts to different screen sizes and allows for greater customization. As follows:

80974-capture.jpg



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


capture.jpg (18.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your answer. How would I modify NavigationView to have the items wrap around and be all on display instead of having a drop-down to navigate. So in the screenshot you sent me, instead of clicking on "More" drop-down, have section9 on second row under section1, section10 on second row under section 2 etc...

0 Votes 0 ·

@JohnMartel-4927 There are many design mechanisms inside the HeaderTemplate of NavigationView and Pivot. It is very difficult to change it. It is recommended to write a custom HeaderTemplate to achieve it.

0 Votes 0 ·