Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x:Null support in x:Bind expressions #5377

Closed
jeromelaban opened this issue Mar 3, 2021 · 0 comments
Closed

x:Null support in x:Bind expressions #5377

jeromelaban opened this issue Mar 3, 2021 · 0 comments
Labels
area/xBind 🪢 Categorizes an issue or PR as relevant to x:Bind difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/enhancement New feature or request project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@jeromelaban
Copy link
Member

Current behavior

The following expression does not build properly:

Published.ToString('MMM d', {x:Null})

Workaround

Use this instead:

Text="{x:Bind sys:String.Format('{0:MMM d}', Published)}"

Environment

Nuget Package Version(s): 3.6-dev

Note to contributors

The support for this type of conversion is located here:

internal static string Rewrite(string contextName, string rawFunction, Func<string, bool> isStaticMethod)

@jeromelaban jeromelaban added kind/enhancement New feature or request area/xBind 🪢 Categorizes an issue or PR as relevant to x:Bind project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding labels Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/xBind 🪢 Categorizes an issue or PR as relevant to x:Bind difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/enhancement New feature or request project/binding 🪢 Categorizes an issue or PR as relevant to the binding engine project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
None yet
Development

No branches or pull requests

1 participant