سؤال

أحاول إضافة اثنين من 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