Open
Description
Description
In a release buil a Shell.MenuItemTemplate which includes x:DataType="MenuItem"
does not work correctly (the binding to the Text property does not seem to work).
For example:
<Shell.MenuItemTemplate>
<DataTemplate>
<ContentView>
<Label Text="{Binding Text}"
x:DataType="MenuItem"
/>
</ContentView>
</DataTemplate>
</Shell.MenuItemTemplate>
Will produce a blank line in a release build on Windows but correctly show the MenuItem Text property in a debug build.
Steps to Reproduce
- Download the repository
- Create and run a Debug build, you should see this:
- Repeat with a Release Build and the MenuItem lines will be blank.
Link to public reproduction project repository
https://github.com/david-maw/ShellTemplate.git
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows, I was not able test on other platforms
Affected platform versions
Windows 11
Did you find any workaround?
Delete the x:DataType="MenuItem"
and it works in both release and debug builds.
Relevant log output
No response