You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[x:True x:False] Clarify where the x extensions for true or false are available #20928
It seems like they are not available in TargetNullValue or FallbackValue of xaml, where they migh make sense like in the example. lets say the button should only be enabled if the textbox is not empty, but for such "easy" Task you might rather not want to use just for this codebehind. that would be in my opinion a good usecase for it. but the compiler is other opinion...
#19155@jeromelaban@MartinZikmund
sorry for taking so long, I just forgot about it and stamped it for myself as not usable.
Seems like its only available in the direct Bind function but not for those Values to be set. I was thinking about this as workaround for the Navigator providing the DataContext not at the point where it is bound and the SourceGen Roslyn issue. I can not change those, but I were hoping that would be usable without codebehind...
@MartinZikmund hm okay, but from your knowledge, can you tell if you would even be expecting that these x Variables would be available at those parts of a binding like an x:String or not?
You mentioning the WinUI but from what I did understand is that this is a Uno Specific (at least its listed as such in the docs?) so I would not expect a non uno WinUI app to provide those 🤔
Validation update (2026-03-05): I reviewed this on branch fix/algolia-docsearch-duplicates-and-layout (PR #22789). This issue still persists / is not resolved by the current branch changes. Tracking and consolidation: #22788.
Confirmed after looking at our source generator: in Uno (matching WinUI/UWP), x:True, x:False and x:Null are recognized only as literal parameters inside {x:Bind ...} function calls (e.g. {x:Bind MyFunc(x:False)}). They are not general-purpose boolean markup extensions and cannot be used in FallbackValue, TargetNullValue, or anywhere else a property accepts a value - WinUI behaves the same way, so this is not an Uno-specific limitation. The docs page does list this only under the x:Bind function parameters section, but I agree it could be made more explicit. Keeping this open with the kind/documentation label so we can tighten the wording to clarify that these are scoped to x:Bind function arguments.
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.
Activity
MartinZikmund commentedon Jul 7, 2025
The rule of thumb would be whether the same does work in WinUI or not. If yes, then we might have discrepancy
DevTKSS commentedon Jul 7, 2025
@MartinZikmund hm okay, but from your knowledge, can you tell if you would even be expecting that these x Variables would be available at those parts of a binding like an x:String or not?
You mentioning the WinUI but from what I did understand is that this is a Uno Specific (at least its listed as such in the docs?) so I would not expect a non uno WinUI app to provide those 🤔
Jen-Uno commentedon Mar 6, 2026
Validation update (2026-03-05): I reviewed this on branch fix/algolia-docsearch-duplicates-and-layout (PR #22789). This issue still persists / is not resolved by the current branch changes. Tracking and consolidation: #22788.
MartinZikmund commentedon May 18, 2026
Confirmed after looking at our source generator: in Uno (matching WinUI/UWP),
x:True,x:Falseandx:Nullare recognized only as literal parameters inside{x:Bind ...}function calls (e.g.{x:Bind MyFunc(x:False)}). They are not general-purpose boolean markup extensions and cannot be used inFallbackValue,TargetNullValue, or anywhere else a property accepts a value - WinUI behaves the same way, so this is not an Uno-specific limitation. The docs page does list this only under the x:Bind function parameters section, but I agree it could be made more explicit. Keeping this open with thekind/documentationlabel so we can tighten the wording to clarify that these are scoped to x:Bind function arguments.github-actions commentedon Oct 31, 2026
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.