2009-07-16 8 views
0

私はWPFウィンドウに2つのDatatriggersを追加しようとしています。通常これは、ウィンドウに追加することによって機能します。C#/ WPF:ResourceDictionaryが既に存在する場合でもWindow.Styleを追加します。

`<Style TargetType="{x:Type TextBlock}"></Style>`  

この場合、私は既にその中に

`<ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />` 

を持っています。そこから定義を上書きする方法はありますか?

ありがとうございます!

乾杯

答えて

1

はこれを試してみてください:

<ResourceDictionary> 
    <ResourceDictionary.MergedDictionaries> 
    <ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml"/> 
    </ResourceDictionary.MergedDictionaries> 
    <!-- Other stuff here --> 
    <Style .../> 
</ResourceDictionary> 
+0

グレート!これは機能します。ありがとうございました。 –

関連する問題