开发者

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 de开发者_如何学Cpendent 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


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜