nondos

Hello

I've started new WPF Application project in VS 2005 then i added to the soultion new project as Custom Control Library (WPF).

Now i need to add the custom control to the WPF Application but i can't find it in the tool box i've treid to build the control but it didn't help

Any idea

link to the project files:

http://rapidshare.com/files/49390103/WindowsApplication1.rar.html



Re: Windows Presentation Foundation (WPF) Problem with importing user control from one project to another

Marlon Grech


hi there,

what you need to do is add a refence to the project and then add an xml namespace decleration

Example

if you had a user control named "Test" under a namespace "CustomControls" and the project name (assembly Name) is TestControl

in xaml you would do the following

<Window
....
xmlns:controls="clr-namespace:CustomControls;assembly=TestControl">

<controls:Test x:Name="myControl" />


hope this helps