• 大小:
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-11
  • 语言: C#
  • 标签: C#  

资源简介

提供各种wpf中控件的样式,可以根据主题来切换解决方案中的主题

资源截图

代码片段和文件信息

namespace WPF.Themes
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Reflection;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    
    public static class ThemeManager
    {
        public static ResourceDictionary GetThemeResourceDictionary(string theme)
        {
            if (theme != null)
            {
                Assembly assembly = Assembly.LoadFrom(“WPF.Themes.dll“);
                string packUri = String.Format(@“/WPF.Themes;component/{0}/Theme.xaml“ theme);
                return Application.LoadComponent(new Uri(packUri UriKind.Relative)) as ResourceDictionary;
            }
            return null;
        }

        public static string[] GetThemes()
      

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-11-21 16:14  WPF_Theme\
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes\
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes.Demo\
     文件         381  2009-09-09 19:24  WPF_Theme\WPF.Themes.Demo\App.xaml
     文件         577  2009-09-09 19:24  WPF_Theme\WPF.Themes.Demo\App.xaml.cs
     目录           0  2012-09-18 21:41  WPF_Theme\WPF.Themes.Demo\bin\
     目录           0  2012-11-21 16:16  WPF_Theme\WPF.Themes.Demo\bin\Debug\
     目录           0  2012-09-18 21:41  WPF_Theme\WPF.Themes.Demo\bin\Release\
     目录           0  2012-11-21 16:17  WPF_Theme\WPF.Themes.Demo\obj\
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes.Demo\Properties\
     文件        2324  2009-09-09 19:24  WPF_Theme\WPF.Themes.Demo\Properties\AssemblyInfo.cs
     文件        2866  2012-06-23 13:01  WPF_Theme\WPF.Themes.Demo\Properties\Resources.Designer.cs
     文件        5612  2009-09-09 19:24  WPF_Theme\WPF.Themes.Demo\Properties\Resources.resx
     文件        1111  2012-06-23 13:01  WPF_Theme\WPF.Themes.Demo\Properties\Settings.Designer.cs
     文件         201  2009-09-09 19:24  WPF_Theme\WPF.Themes.Demo\Properties\Settings.settings
     文件        4413  2009-09-09 19:24  WPF_Theme\WPF.Themes.Demo\Window1.xaml
     文件        3415  2012-06-23 13:06  WPF_Theme\WPF.Themes.Demo\Window1.xaml.cs
     文件        6446  2012-06-23 13:01  WPF_Theme\WPF.Themes.Demo\WPF.Themes.Demo.csproj
     文件         452  2012-06-23 13:01  WPF_Theme\WPF.Themes.Demo\WPF.Themes.Demo.csproj.user
     文件        1419  2012-06-23 13:01  WPF_Theme\WPF.Themes.sln
     文件       22016  2012-11-21 16:16  WPF_Theme\WPF.Themes.suo
     目录           0  2012-09-18 21:41  WPF_Theme\WPF.Themes\bin\
     目录           0  2012-11-21 16:17  WPF_Theme\WPF.Themes\bin\Debug\
     目录           0  2012-09-18 21:41  WPF_Theme\WPF.Themes\bin\Release\
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes\BubbleCreme\
     文件      342127  2009-09-09 19:24  WPF_Theme\WPF.Themes\BubbleCreme\Theme.xaml
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes\BureauBlack\
     文件      325074  2009-09-09 19:24  WPF_Theme\WPF.Themes\BureauBlack\Theme.xaml
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes\BureauBlue\
     文件      324746  2009-09-09 19:24  WPF_Theme\WPF.Themes\BureauBlue\Theme.xaml
     目录           0  2012-09-24 16:56  WPF_Theme\WPF.Themes\DavesGlossyControls\
............此处省略45个文件信息

评论

共有 条评论