Comments (3)
I think this issue may be related to my windows build. This happened on 18231, but since updating to 18240, NavigationViewItem controls are being generated properly.
I'll leave this open though, since there might still be something else going on.
from microsoft-ui-xaml.
@ClairelyClaire that you for reporting this issue.
This behavior happens when a Windows.UI.Xaml.Controls.NavigationViewItem is added to a Microsoft.UI.Xaml.Controls.NavigationView. You only get the correct behavior when a Microsoft.UI.Xaml.Controls.NavigationViewItem is added to a Microsoft.UI.Xaml.Controls.NavigationView. The controls in the Microsoft.UI.Xaml namespace are from the NuGet package. The controls in the Windows.UI.Xaml namespace are the ones that are from the OS.
If you update your code to create Microsoft.UI.Xaml.Controls.NavigationViewItems, you should get the correct behavior.
Because the MenuItem property is typed to collection of object, the type system doesn't really help here.
Thanks for the feedback.
from microsoft-ui-xaml.
Thanks! I added this to my using:
using NavigationView = Microsoft.UI.Xaml.Controls.NavigationView;
using NavigationViewItem = Microsoft.UI.Xaml.Controls.NavigationViewItem;
using NavigationViewItemInvokedEventArgs = Microsoft.UI.Xaml.Controls.NavigationViewItemInvokedEventArgs;
I don't think I had that added when I posted this issue, but things look to be working now.
from microsoft-ui-xaml.
Related Issues (20)
- MapControl: Unable to disable map rotation HOT 1
- Exception in DataGrid with runtime type
- WindowsAppSDK v 1.5 Breaks WACK HOT 2
- MapControl: Cannot bind collection to render XAML elements
- MapControl: Cannot add MapElements HOT 1
- WinUI3 XAML Custom Control: Label Text Not Displaying for Multiple Instances Correctly
- WinUI 3 custom title bar captures focus from flyouts HOT 5
- Enable Direct Color Changes Using Theme Resources in C# for WinUI3
- Proposal:Visual designer for WinUI3 HOT 1
- Symbol Icon shows wrong symbol for FullScreen
- ms-appx:// references in XAML are not redirected when PublishSingleFile is enabed HOT 1
- TextBlock: BodyLargeTextBlockStyle is missing HOT 1
- How to pass package family name in ms-settings uri? HOT 1
- Bug:Build failure due to namespace changes in XamlTypeInfo after C++/WinRT update HOT 4
- x:Bind not working with StateTrigger
- XAML Binding Failures view in VS2022 doesn't work
- A zero length string can kill the IDE.
- FilePicker does not open when running as administrator HOT 2
- Regression: .net nuget packaged controls not presentable when referencing from C++ project HOT 1
- WindowsAppSDK v 1.5 Breaks WACK HOT 3
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 microsoft-ui-xaml.