I am working on a UserControl in a Silverlight project in visual studio 2010.
This user control uses Labels as follows:
<sdk:Label .../>
-or-
<sdk:Label>
singleObject
</sdk:Label>
-or-
<sdk:Label>stringContent</sdk:Label>
as described here
However, when I create a WPF project link it to Silverlight Library Project:
(by adding existing items (Add Link) to cs classes and the .xaml file defining the control)
I get the following error in build:
The tag 'Label' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk'. Line 49 Position 18. myfile.xaml 49 18 MyLibraryWPF
This doc shows that labels in WPF are declared without the sdk:
like this:
<Label>
Content
</Label>
yet, I cannot change that in my Silverlight project. It will be a real waste to create a whole new project and duplicate the code to make it work.
How to make the Labels work with both Silverlight and WPF projects?