C
C#7mo ago
ItsGaiJ

✅ WinUI 3 Template Studio, NavigationView Header in Settings Page is Missing

Hi! I started a new WinUI 3 Project with Template Studio. My issue is when is set PaneDisplayMode to Top the NavigationView Header ("Settings" Text) is missing. This only happen to the Settings Page, every other page have no problem. I checked the Live Visual Tree and 'HeaderContent' Visibility is set to "Collapsed" by Animation or Visual States by I couldn't find where it is being set. I tried to set the Visibility to Visible from the code-behind but it didn't work. Any help would be appreciated. Thanks.
No description
No description
No description
2 Replies
ItsGaiJ
ItsGaiJOP7mo ago
This is what fixed it, a reply from a member of #gui chat: "this is because the header is set to the Content of the navigation item in the template. When the pane is in the top mode, the design is such that settings button has no content, so the header disappears. you can override this by modifying 'SettingsPage.xaml' and adding
xmlns:behaviors="using:InsertYourAppsNamespace.Behaviors"
behaviors:NavigationViewHeaderBehavior.HeaderContext="Settings"
xmlns:behaviors="using:InsertYourAppsNamespace.Behaviors"
behaviors:NavigationViewHeaderBehavior.HeaderContext="Settings"
to the <Page ... properties"
MODiX
MODiX7mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server