C # class library project type in Visual Studio is missing WPF resource dictionary item in menu

My code is setting up a WPF entity ListBox

using styles. I would like to convert this code into a class definition (for reuse). Since I am not expanding ListBox

but only style, I am told in various tutorials and experts that no user control or user control is needed.

So, I select the C # Class Library project type from Visual Studio to generate the class code. However, because this project type is generic and not WPF specific, when I try to add a resource dictionary to my class, this option is missing from the Add menu (see picture).

V0Dvurg.png

It makes me wonder if I was on the right track from the start?

I've checked other related SO questions (like this one ), but none of them show how to create a specific WPF class library that isn't user or user control).

C #, Windows 7, Visual Studio 2010.

+3


source to share


1 answer


Yes, you're okay. Just use Add> New Item ... and find the appropriate resource template. Done.



The options in this menu are based on the project type. They are hardly useful. I usually always use dialogue and search to find my templates.

+3


source







All Articles