I have a newbie WPF question.
Imagine my user control has a namespace declaration like this:
xmlns:system="clr-namespace:System;assembly=mscorlib"
And I have resources for the user control like this:
<UserControl.Resources>
<system:Int32 x:Key="Today">32</system:Int32>
</UserControl.Resources>
And then somewhere in my user control I have this:
<TextBlock Text="{StaticResource Today}"/>
This will cause an error because Today is defined as a integer resource, but the Text property is expecting a string. This example is contrived, but hopefully illustrates the question.
The question is, short of making my resource type exactly match the property type, is there a way for me to provide a converter for my resources? Something like IValueConverter for bindings or a type converter.
Thank you!