2016-09-23 4 views
0

私のアプリケーションでは、スタイル用にResourceDictionariesを使用しています。例:HDDファイルのWPFスタイル

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
    <Style TargetType="{x:Type Button}" x:Key="SimpleButton"> 
     <Setter Property="Foreground" Value="{DynamicResource SpecialRed}"/> 
     <Setter Property="FontSize" Value="40"/> 
     <Setter Property="Margin" Value="10"/> 
    </Style> 

</ResourceDictionary> 

言い換えれば、私はリソースディクショナリの見た目を知っています。 HDDから自分のファイルからリソースを上書きすることはできますか?私はユーザーがこれを行うことができる機能を追加したい。

私のHDDファイル:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
    <Style TargetType="{x:Type Button}" x:Key="SimpleButton"> 
     <Setter Property="Foreground" Value="{DynamicResource SpecialRed}"/> 
     <Setter Property="FontSize" Value="70"/> 
     <Setter Property="Margin" Value="20"/> 
    </Style> 

</ResourceDictionary> 
+0

あなたが使用してthatsの開発者「ユーザー」を意味しますかあなたのコントロール?または、コンパイルされたアプリケーションのルック&フィールを変更できるようにするエンドユーザーですか? – SledgeHammer

+0

私はエンドユーザーを意味します。 – Piotrek

+0

ランダムエンドユーザーにXAMLを混乱させたいのですか? Yikes。私のフィールド。もっとユーザーフレンドリーな設定ダイアログしかないのはなぜでしょうか。 – SledgeHammer

答えて