Skip to content

[xaml-gen] XAML generator allows setting read-only dependency properties #20504

Open

Description

@MartinZikmund

Current behavior

Some properties on controls like NavigationView.SettingsItem are get-only, so they should not allow setting in XAML:

<NavigationView>
  <NavigationView.SettingsItem>
  	<NavigationViewItem Content="AppSettings" uen:Region.Name="Products" />
  </NavigationView.SettingsItem>
</NavigationView>

This compiles in Uno Platform.

Expected behavior

Fails to compile on WinUI, should also fail in Uno Platform.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

Yes

Environment

Uno.SourceGenerationTasks

NuGet package version(s)

No response

Renderer

  • Skia
  • Native

Affected platforms

Build tasks

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    kind/bug
    area/code-generation
    on May 22, 2025
  2. DevTKSS commented on May 22, 2025

    @DevTKSS
    Contributor

    @MartinZikmund okay, so if this would be then only get, can you tell how this could then be bound to a navigation callback? Can we expect the settingsitem to also callback the itemInvoked?
    I would understand "should not be able to be set in xaml" as 1. Its hidden or 2. We might have to use Codebehind event which I at least would not be able to get a reliable way to bind my VM in mvux because of the roslyn issue from the point my model needs parameters and not has an empty constructor.
    3. I could think of, would be the navigator black list words would be changed some way... I think I readed in the docs, that uen:Region.Name="Settings"/> belongs to the "dont use this region name" list, so that would be problematic

  3. agneszitte commented on Nov 17, 2025

    @agneszitte
    Member

    @MartinZikmund is this still the case lately ?

  4. DevTKSS commented on Nov 18, 2025

    @DevTKSS
    Contributor

    @agneszitte @MartinZikmund
    To the extensions PR that is adding Settings on the other issue linked from Martin I would see one thing that is missing in the docs still which would be good if someone would tell about this, please?

    Mentioned in my last comment, the "Settings" Region is named hard coded (last file edited in the extensions PR) and the Region.Name Docs not-use list contains "Settings" as possible existing class name and we should avoid using it. So if Uno then in exchange uses this Name + nobody registers this in his RouteMap of his app, or even has maybe multiple different Settings pages for larger / business apps, that will potentially cause problems we can not solve on user side.

    https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/HowTo-DefineRoutes.html

    And in the https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/Advanced/HowTo-UseNavigationView.html

    Which is explicitly about NavigationView (!) there is no information too about using settingsitem.
    So, is the imported docs commit from uno.extensions containing the docs that was created along that PR or is there an update still outstanding?

  5. changed the title [-]XAML generator allows setting read-only dependency properties[/-] [+][xaml-gen] XAML generator allows setting read-only dependency properties[/+] on Nov 25, 2025
  6. self-assigned this
    on Nov 26, 2025
  7. github-actions commented on May 13, 2026

    @github-actions
    Contributor

    This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.

  8. added
    stale
    on May 13, 2026
  9. removed
    stale
    on May 13, 2026
  10. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.

  11. added
    stale
    on Sep 11, 2026
  12. github-actions commented on Sep 21, 2026

    @github-actions
    Contributor

    This issue was closed because it had no activity for 10 days after being marked as stale. If you believe this is still relevant, feel free to reopen it or open a new issue with updated context.

  13. Jen-Uno commented on Oct 28, 2026

    @Jen-Uno
    Contributor

    This issue was closed as not planned, so there is nothing for QA to verify. Moving it from Ready for QA Review to Done on the Uno Team Backlog.

  14. removed
    stale
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/code-generationkind/bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions