How to use a theme in wpf?

Asked

Viewed 433 times

3

I’m trying to use a package of WPF themes, but I can’t call it, when I use it says it lacks the reference and I can’t find any tutorial or anything current about it.

erro

I tried to install using nuget and the themes of this link

http://wpf.codeplex.com/wikipage?title=WPF%20Themes

NOTE: I am using the VS12 and VS13

  • Have you checked if WPF is not pointing to the Client Profile instead of pointing to your . NET Framework? For example, if your library points to the . NET 3.5, make sure WPF is also pointing to . NET 3.5 or 4.0, not Client Profile.

1 answer

2


I know the question is old but can help others, I know two ways to do:

1º Way is Via Nuget: Right click on the project and select "Manage Nuget Packages" option and install Wpfthemes.

Imagem 01

It will command the WPF.Themes reference automatically

Imagem 02

Now in your main form do the same as the image below

Imagem 03

Note that this way the theme will only be applied when the project is running

Imagem 04

Imagem 05

2º Way: Downloading the Thema code on the link: https://wpfthemes.codeplex.com/SourceControl/latest

Add the downloaded Thema file to your project and within the app.xaml add the reference to it:

Imagem 06

Note that this way it is loaded in design mode and you have access to the code to edit according to your preference.

Obj: If it doesn’t appear first, from a rebuild in your solution, close and open the visual studio.

Imagem 07

Browser other questions tagged

You are not signed in. Login or sign up in order to post.