我正在尝试将两个DataTriggers添加到我的WPF窗口中。通常,这将通过添加

`<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" />`  

在里面。有没有办法从那里覆盖定义?

非常感谢!

干杯

有帮助吗?

解决方案

尝试这个:

<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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top