Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to supply a type converter for a static resource in Silverlight?

I'm trying to style a LineSeries chart that has DateTime objects on its independent axis and integer values in its dependent axis. I want to show a tooltip text whenever a user overs his mouse on a DataPoint, showing both its independent and dependent values, but I need to format the DateTime object in order to display the formatation I would like.

I found this example that uses the property ContentStringFormat of a ContentControl, but after some digging I learnt that that property is not available in Silverlight, only on WPF. So I found another example that uses a converter, but I can't place the converter definition on the ResourseDictionary as I can on a UserControl, because a ResourceDictionary doesn't have the property Resources.. :(

I don't know if I explained myself right, but my question is.. Is it possible to supply a type converter for a static resource in Silverlight?

EDIT - XAML

like image 337
jpgamaral Avatar asked Dec 06 '25 04:12

jpgamaral


1 Answers

Take a look at this SO thread: Pass value of a field to Silverlight ConverterParameter

It has tons of different approaches for getting around converter limitations!

like image 66
dain Avatar answered Dec 07 '25 18:12

dain



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!