Reputation: 18485
Why don't I find the System.Windows.Controls namespace in my object browser in Visual Studio?
Upvotes: 4
Views: 3641
Reputation: 5655
You have to reference the PresentationFramework
assembly from Microsoft because you are trying to use a WPF namespace
.
If you set up a WPF project from scratch it should be included. When you start in VS with some other project type you might need to add this reference by hand. Right-click the references node under your project add select Add Reference. Then in the dialog that pops up you go to the tab page called .NET and browse for the right assembly.
Upvotes: 5