WPF-How to use Application themes (skins)

Source: Internet
Author: User
The application theme designs the various UI components that the application will use, based on the design needs of our applications. Application topics are generally defined in a XAML file that contains style settings and triggers for various UI components.
How to get the program theme 1, online open source theme, directly download the use. The most official is the website of WPF: http://wpf.codeplex.com/. 2, the design of the theme, the general use of Microsoft Expression Blend design.
How to Use program topics whether it's a downloaded WPF theme or a custom theme, they are XAML files that you can use in a XAML file by embedding them in your application's binary resources. 1. Copy the theme file into the project and set the property "build operation" as resource. 2. Install the theme file into the application resource dictionary, and the styles defined in the theme file will take effect throughout the application.
<!--App.xaml-->
   <Application.Resources>
       <resourcedictionary source= "resources/themes/ Expressiondark.xaml "/>
   </Application.Resources>
3. Directly using the UI component, the UI component automatically applies the styles defined in the theme file.
<button content= "button" height= "" Name= "Button1" width= "a"/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.