Are XAML string bindings through Tuples supposed to work?
My ViewModel:
public (string Value, string Unit) MyTuple => ("-", "ft")
// HACK: Workaround
public string MyTupleValue => MyTuple.Value;
public string MyTupleUnit => MyTuple.Unit;
I'd like to do the following:
<Label Text="{Binding MyTuple.Value}">
<Label Text="{Binding MyTuple.Unit}">
However, it doesn't result in anything being displayed (although MyTuple
gets called for both Label
s).
My workaround:
<Label Text="{Binding MyTupleValue}">
<Label Text="{Binding MyTupleUnit}">
I've also tried removing the C#7 component names Value
and Unit
and using Item1
and Item2
instead, but that also didn't work.