Reputation: 832
I am trying to use System.Windows.Controls.TextChangedEventArgs
, but I cannot import System.Windows.Controls
. When I try to add a reference, System.Windows.Controls
is not one of the assemblies that I can select.
Does anyone know how to resolve the issue?
Upvotes: 16
Views: 30771
Reputation: 27237
The accepted answer tells you the problem but does not tell you how to solve it.I'll just add this for future visitors.
To solve this problem, you need to add the reference to PresentationFramework.dll
.
1 Go to Solutions Explorer
(it's on the right of your IDE) > Right click on References
2 Select Add Reference
in the window that opens, look for Presentation Framework
, check the box and click okay. That's all. This is the way to add references to your project.
Upvotes: 21
Reputation: 887195
System.Windows.Controls
is a namespace that contains classes defined in PresentationFramework.dll
.
However, if you don't already have a reference to that assembly, you're probably doing something wrong.
Are you sure you're actually using WPF?
Upvotes: 12