Reputation: 2056
When I want to create a custom control(not user control),I can't find Custom Control
tempalte in Add New Item
dialog .
How to find or add the custom control
template for WPF in Add New Item
dialog ?
Upvotes: 1
Views: 1414
Reputation: 13817
If you have existing project and you don't want to reacreate it, add following line to <PropertyGroup>
in your .csproj file.
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Then add following line to AssemblyInfo.cs
to make sure your themes are working
[assembly: ThemeInfo( ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
Upvotes: 3
Reputation: 21712
A WPF Custom Control is a project type; you add one to a Solution with Add / New Project. It looks like you're trying to add a single file to a Project with Add / New Item.
Upvotes: 1