zoukankan      html  css  js  c++  java
  • Share wpf styles for more solution projects

    first, you would have to create your styles in one (or more) RDs in your project "AppStyle". Let's assume there would be a file "stili.xaml" in that project's root folder, containing something along the lines of:

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
      <Style TargetType="Button">
       <!-- ... -->
      </Style>
    </ResourceDictionary>
    
    

    To use the above RD, you would then add a link to it in your other assemblies' App.xaml like so:

    <Application.Resources>
      <!-- ... -->
      <ResourceDictionary>
       <ResourceDictionary.MergedDictionaries>
         <ResourceDictionary Source="pack://application:,,,/AppStyle;component/stili.xaml" />
       </ResourceDictionary.MergedDictionaries>
      </ResourceDictionary>
    </Application.Resources>
    
  • 相关阅读:
    闭包问题小总结
    git常用命令总结
    数组对象方法的使用
    JS截取URL参数
    CSS清除浮动&内容居中&文字溢出
    网址大全
    any more
    下载网页视频
    下载无损音乐
    "前端" 宝藏网站
  • 原文地址:https://www.cnblogs.com/ysharp/p/2060107.html
Copyright © 2011-2022 走看看