Open michael-hawker opened 4 years ago
Just hit this again trying to do some Graph work with binding Query Options, would have been nice to do this:
<wgt:QueryOption
Name="endDateTime"
Value="{x:Bind system:DateTimeOffset.Now.Date.ToUniversalTime().AddDays(3).ToString('o', global:CultureInfo.InvariantCulture)}"/>
Unfortunately, it's not possible without this issue, so I have to break it up into two separate properties which is a pain.
Also, x:Bind/compiler doesn't seem to find the ToUniversalTime
or AddDays
methods? That seems like another bug, where should I file that? i.e. just trying to {x:Bind system:DateTimeOffset.Now.Date.ToUniversalTime()}
fails.
Proposal: x:Bind functions should support calling another function within its parameter list
From comment here, Related #1630
Summary
It's difficult to do complex expressions in x:Bind to composite to UI triggers/converter replacement type scenarios from back-end model data.
Rationale
Scope
{x:Bind myns:StaticClass.DoConversion(ViewModel.Data).ToString()}
Examples
Open Questions