Converter with Complex object
LeoJHarris opened this issue · 0 comments
LeoJHarris commented
Hi there I am passing a Complex object to my converter and returning a string value with the converter as a text prop in my xaml, gorilla player knows about the converter however I'm not sure how can I define in the SampleData.Json file the type or something else such that gorilla player resolves the type.
Currently the value in my converter has the below when I save the SampleData.Json file:
"Views\\ViewCells\\StockViewCell.xaml": {
"Description": "Lorem ipsum",
"EmptyListMessage": "No stock found",
"Notes": "Notes",
"SalePrice1": {
"Id": "1",
"Name": "Price1",
"Price": "122"
},
"TotalPrice": 33.0
}
The SalePrice class type is pretty simple:
public class SalePrice
{
public string Price { get; set; }
public string Id { get; set; }
public string Name { get; set; }
}
Also the XAML looks like this for the converter:
Text="{Binding TotalPrice, Converter={StaticResource priceDoubleToPriceTextConverter}}"
Any ideas?? Is this possible or no?