Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Putting ValueConverter reference in ResourceDictionary (Fails)
3 replies. Latest Post by Tomek Kmiecik on March 25, 2009.
(0)
philjones
Member
60 points
100 Posts
03-25-2009 1:46 PM |
I have a ValueConvter, which works find when referenced within the XAML within an actual control. Eg:
<Grid.Resources> <Search:IsReadIconConverter x:Key="isReadIconConverter" /> <DataTemplate x:Key="IsReadCell"> <Image Source="{Binding Converter={StaticResource isReadIconConverter}}" Stretch="None" /> </DataTemplate> </Grid.Resources>
<Search:IsReadIconConverter x:Key="isReadIconConverter" />
...just sitting in the ResourceDictionary. Is there something different I need to do to put a ValueConverter class reference of this kind in a ResourceDictionary?
Thanks!
MarkTap
Participant
1442 points
263 Posts
03-25-2009 4:02 PM |
Is your converter class public?
03-25-2009 7:34 PM |
Yes, it is public - and it's working in the context of the control. I wonder if it's a bug in the new MergedDictionaries code within SL3. Thanks. P
Tomek Km...
356 points
69 Posts
03-25-2009 8:25 PM |
Hey,
How do you define your xmlns:Search namespace? Probably you are using just the namespace, without the assembly name:
xmlns:Search='clr-namespace:MyNamespace;MyAssembly'
Best regards,Tomek