Comments (5)
It should be possible to reverse engineer it, you just have to get your hands dirty with the styling. I've tried to get you started with some some of what's needed, I'll leave the rest to you to figure out.
<Style Selector="ui|NavigationView">
<Setter Property="PaneDisplayMode" Value="Left" />
<Setter Property="IsBackButtonVisible" Value="False" />
<Setter Property="IsPaneToggleButtonVisible" Value="False" />
<Setter Property="IsSettingsVisible" Value="False" />
<Setter Property="OpenPaneLength" Value="70" /> Change 70 to whatever you like
<Setter Property="IsPaneOpen" Value="True" />
</Style>
Adjust the foregrounds
<Style Selector="ui|NavigationViewItem">
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
</Style>
<Style Selector="ui|NavigationViewItem:selected TextBlock">
<Setter Property="Foreground" Value="{DynamicResource AccentTextFillColorPrimaryBrush}" />
</Style>
<Style Selector="ui|NavigationViewItem:selected :is(ui|IconElement)">
<Setter Property="Foreground" Value="{DynamicResource AccentTextFillColorPrimaryBrush}" />
</Style>
If using a SymbolIcon, you can switch to the Filled version when it's selected like this, if not, you'll have to find another way to do this
<Style Selector="ui|NavigationViewItem:selected ui|SymbolIcon">
<Setter Property="UseFilled" Value="True" />
</Style>
You'll also have to mess with the template of the NavigationViewItemPresenter
, namely to remove the ColumnDefinitions on the ContentGrid
element, and then you can play around with aligning the Icon & ContentPresenter as needed. You'll also need to remove the Margin of the ContentPresenter so it doesn't clip anything.
Here you have 2 options, you can hard code everything into the template of the NVI Presenter to get it how you like - once you make the changes above, you just adjust margins & alignments to get it displaying right & add some additional style selectors to handle selection, etc. As long as all template parts remain in Type and Name (where specified), everything should still link up properly (code behind logic & colors).
Or you can make the couple adjustments above and then implement it all in a MenuItemTemplate. Bind your item viewmodel to the Content property of the item & design the template to mimic the new Win Store version. Don't set the icon on the NVI in this case, create an IconElement in your template. This is more dynamic in that you have better control per item of how it displays, but only works if your binding. You may also need some behaviors or some special style selectors to get everything working via selection, etc, but this is all pretty trivial stuff.
Don't be afraid to get your hand dirty with the Styling system, and if something looks off, DevTools is your friend :)
from fluentavalonia.
It's a NavigationView
with Fluent version 2 styles and some customization.
Below illustrates how the Fluent version 2 NavigationView
actually looks without customization in the WinUI XAML controls gallery.
Edit: Some of the customization I see:
- Navigation view item size is increased along with the icons
- Switching the icons between regular and filled variants based on selection
- Removing the navigation (hamburger) and search buttons entirely (can easily be disabled)
- Adding additional items in the
FooterMenuItems
from fluentavalonia.
Is there any sample XAML of how to achieve the store's design...as it seems many Windows 11 apps are adapting the same design of this store navigation view?
from fluentavalonia.
Is there any sample XAML of how to achieve the store's design
Not that I know of. It's possible that WinUI 3 has changed the style we see in the WinUI library as well.
from fluentavalonia.
Ah ok. I believe the WinUI 3 library is still using the Version 1 styles.
Hopefully Microsoft releases a sample or something of how to achieve this with the navigation view.
from fluentavalonia.
Related Issues (20)
- Add support for TreeDataGrid control HOT 1
- Improve expander animations HOT 2
- Expander flickers HOT 2
- Reveal password icon is the wrong color in dark mode HOT 3
- Option for blue TaskDialogButton color HOT 2
- TaskDialog Binding HOT 2
- [Bug?] System.DivideByZeroException: 'Attempted to divide by zero.' when opening FAComboBox inside PropertyGrid HOT 2
- FAComboBox with IsTextSearchEnabled doesn't search through the whole collection but only the visible items HOT 2
- Tab selection does not work when moved to a different window HOT 1
- In High Contrast them, the selected item in a tab control is not underlined
- Task Dialog Hijacking Focus
- Toggleable menu item not showing checkbox/radiobutton
- NavigationView Footer Item Bug HOT 1
- Text disappears from Editable TextBox
- Borderless window HOT 1
- SelectableTextBlock Issues HOT 1
- TabView border disappears when there is a single tab only HOT 7
- Button area overflows the window in a wide TaskDialog HOT 1
- Issue running latest sample HOT 3
- MacOS titlebar has a space ontop of content window HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentavalonia.