Reputation: 103
I am hoping this problem is just me being unfamiliar with WPF. I am able to use the XCeed toolkit in code with no problems:
DateTimePicker dtp = new DateTimePicker();
dtp.HorizontalAlignment = HorizontalAlignment.Left;
dtp.VerticalAlignment = VerticalAlignment.Top;
dtp.Width = 200;
dtp.Height = 24;
dtp.Margin = new Thickness(50, 10, 0, 0);
dtp.FontStyle = FontStyles.Normal;
InBoundGrid.Children.Add(dtp);
This works fine in my form. But I cannot figure out how do get it working in the designer: I've added:
xmlns:wpfx="http://schemas.xceed.com/wpf/xaml/toolkit"
to the Window definition. It shows fine in "intellisense" So when I start typing wpfx:... the DateTimePicker contol shows in the intellisense menu.
However:
<wpfx:DateTimePicker
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="200"
Height="24"
Margin="50,10,0,0"
FontWeight="Normal"
/>
comes back with the error:
"The name "DateTimePicker" does not exist in the namespace http://schemas.xceed.com/wpf/xaml/toolkit"
All the other Xceed controls show the same error in xaml designer. Also, please note I do not want to try the Nuget installer. (I tried but got the same error anyway) I would like to keep my code base as small as possible.
Thanks in advance.
Upvotes: 0
Views: 1848
Reputation: 103
Took me awhile, but I finally found a solution:
1) Go To Build|Configuration Manager 2) Under "Active solution platform" select 3) Change to x64
I had the setting set for AnyCPU. I think it is the default for VS. The designer came back as soon as I set it to x64.
Hopefully this may help anyone else using the Xceed Toolkit in designer.
Upvotes: 4
Reputation: 323
Your code seems to be fine I don't see anything wrong with it. As long as you are sure that url is the correct one to be including.
For me sometimes Visual Studio is a little funny with the XAML. After adding the resource try to rebuild the solution, or clean it then hit build. This seems to refresh the XAML resources. If this doesn't work try restarting Visual Studio.
Upvotes: 0