Is there a way to declare a tuple in xaml so I can use it as a converterparameter?
Not directly.
There are some interesting solutions to similar questions:
Generally, you will have to create your own type that is non-generic and use it instead.
EXAMPLE
For:
Tuple<string, int, double>
You could create a class:
namespace Models
{
class MyData
{
public MyString { get; set; }
public MyInt { get; set; }
public MyDouble { get; set; }
}
}
Then add a namespace to XAML:
xmlns:models="clr-namespace:Models"
Then create your instance as needed:
<models:MyData MyString="someString" MyInt="123" MyDouble="0.1" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With