This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have installed WpfElementsTrial. May I ask where can I find the free themes? Thanks, Candy |
|
|
Hello Candy Go to Start Menu > Mindscape > WPF Elements > WPF Elements Directory. This will open the install directory in windows explorer. Go into the Themes folder and you will find all the free themes. The themes that apply to standard WPF controls are in the files that end with "BuiltIn.xaml". There are 5 themes: OfficeBlue.BuiltIn.xaml, OfficeSilver.BuiltIn.xaml, OfficeBlack.BuiltIn.xaml, Alloy.BuiltIn.xaml and AlloyLight.BuiltIn.xaml. You can copy these files, modify them and use them in any way you need in your applications. To apply one of the themes to an application, Reference the file in a merged ResourceDictionary like this:
Jason Fauchelle |
|
|
Jason, I tried what you said, but it throws a bunch of errors in the theme files. Mainly regarding unfound controls or nonexistent files. Is there some dll I need to import into my project? Or should I just delete the code (in themes) that reference the nonexistent controls? |
|
|
Thanks for pointing this out. I forgot the standard themes uses a couple of classes in WPF Elements. The IfFullTrustExtension is used to include drop-shadow-effects on popups that will automatically be ignored when using the theme in an Xbap (running WPF in a browser). The DoubleToVisibilityConverter is used to hide the scroll bar gripper if the scroll bar is too small. There are 3 main ways to avoid this. The first is as you said to remove the code that uses WPF Elements. If you don't think you need the things that I mentioned above, then you can search through the theme file for "local:" and delete that code. For the drop-shadow-effects, you'll just want to delete the local:IfFullTrust tag and the CDATA tag but keep the DropShadowEffect. Another option is to include the Mindscape.WpfElements.dll to your application, and change the namespace reference at the top of the theme file to this:
Alternatively you can use this code in your application, and reference this locally instead of needing the WPF Elements dll:
And the converter:
Jason Fauchelle |
|