I am getting the error:
the type 'system.windows.controls.control' is defined in an assembly that is not referenced".
How to add a reference to assembly?
Solution Explorer > References (Rigth-click) > Add Reference
Search for System.Windows
and add it to your references.
Also see the documentation: How to: Add or Remove References By Using the Add Reference Dialog Box
See:
In Solution Explorer, double-click the My Project node for the project.
In the Project Designer, click the References tab.
Click the Add button to open the Add Reference dialog box.
In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
Select the components you want to reference, and then click OK.
To reference an assembly you would right-click the References node in the Solution Explorer and select Add.
That said, I have to question why you would be trying to use a WPF control in a project that doesn't already have the appropriate reference(s). Can you explain why because you might be trying to accomplish something in the wrong way?
In visual studio, on solution explorer, right click on references and then click on Add reference, on the right panel you can select references.