0

I have a custom ColorPicker Control without giving x:Name="" to this control gives assembly unknown namespace error:

The type 'ColorPicker' was not found because 'clr-namespace:SilverlightControls;assembly=SilverlightControls' is an unknown namespace..

Whereas it is working fine if I give it a name. Actually I have to use this Control in LisBox. I am using in this way:

xmlns:slColor="clr-namespace:SilverlightControls;assembly=SilverlightControls"

<slColor:ColorPicker  Height="23" Width="20" 
                      Color="{Binding PalleteColor, Mode=TwoWay}">
</slColor:ColorPicker>

Can somebody guide me?

Jens Björnhager
  • 5,632
  • 3
  • 27
  • 47

1 Answers1

0

I'm using the Color Picker too - and had this exact same problem. One way to get around the x:Name problem is to stick it inside another new user control (newControl). Inside the control's XAML, you can instantiate color picker, give it an x:Name="myControl". Then in your repeating Listbox, you can have multiple instances of your newControl. It seems silly, but nesting it just one level deep seems to solve the problem

m1m1k
  • 1,375
  • 13
  • 14