Repository navigation
docs: clarify x:Bind literal argument scope - #24267
SergioAlmeida29 wants to merge 2 commits into
Conversation
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24267/docs/index.html |
morning4coffe-dev
left a comment
There was a problem hiding this comment.
[P2] Please distinguish x:Bind argument tokens from the general {x:Null} markup extension. The new sentence currently groups x:Null with x:True/x:False and says it cannot be assigned to arbitrary XAML properties. WinUI explicitly supports <object property="{x:Null}" />: https://learn.microsoft.com/en-us/windows/apps/develop/platform/xaml/x-null-markup-extension . Uno's own ContentPresenter_Content_DataContext.xaml and ContentPresenter_Template.xaml also use Content="{x:Null}". It is fine to explain that a bare function-argument token is not an attribute-value replacement, but the documentation must not imply that the markup extension itself is unavailable.
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-24267/docs/index.html |
|
Tick the box to add this pull request to the merge queue (same as
|
MartinZikmund
left a comment
There was a problem hiding this comment.
Thanks @SergioAlmeida29! Checked against the generator: XamlFileGenerator rewrites x:True/x:False/x:Null to C# literals only inside the x:Bind expression text, so they really are function-argument tokens. The {x:Null} markup extension is a separate thing, and the earlier review feedback is addressed.
Optional nit: the linked issue asks where these tokens can be used (e.g. TargetNullValue/FallbackValue). Naming that case explicitly would make the docs answer it directly, but not blocking.
GitHub Issue: closes #20928
PR Type:
📚 Documentation content changes
What changed? 🚀
Clarifies that
x:True,x:False, andx:Nullare literal arguments supported in{x:Bind ...}function calls. These bare function-argument tokens are distinct from the{x:Null}markup extension, which remains supported for properties that accept null.PR Checklist ✅
Validation
git diff --check: passed.