Skip to content

Shell.MenuItemTemplate Sometime Does Not Work #21963

Open
@david-maw

Description

@david-maw

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

  1. Download the repository
  2. Create and run a Debug build, you should see this:
    image
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androidplatform/windowspotential-regressionThis issue described a possible regression on a currently supported version., verification pendings/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions