Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Theming: not applied to TextBox, why?
    text
    copied!<p>I must say I am quite new at WPF. I am building my first real application and I am facing some issues, at the moment with themes. This is the reason of my post.</p> <p>In order to use a theme, such as ExpressionDark.xaml, I thought it was sufficient to include it at an application level. Therefore, in my App.xaml I added:</p> <pre><code>&lt;Application.Resources&gt; &lt;ResourceDictionary&gt; &lt;ResourceDictionary.MergedDictionaries&gt; &lt;ResourceDictionary Source="/Skins/ExpressionDark.xaml" /&gt; &lt;/ResourceDictionary.MergedDictionaries&gt; &lt;myLib:Locator x:Key="Locator" /&gt; &lt;/ResourceDictionary&gt; &lt;/Application.Resources&gt; </code></pre> <p>Here is the first question: I am not sure I am doing the right thing. Is it right to include the ExpressionDark.xaml into my application, in the "skins" folder and to reference it in that way? somewhere else I found something like "System.Windows.Theming.ExpressionDark" etc. Would that be the correct approach?</p> <p>Anyway, by applying the theme with the above method, I can see almost all my controls being styled in a proper way; I say "almost all" because some of them, like DataGrids or TextBoxes, are not. I checked inside the ExpressionDark.xaml and I see there are styles defined for these components too. So why am I getting this strange behaviour?</p> <p>I hope I explained everything clearly enough. Let me know if it is not.</p> <p>Thanks in advance for any help you'll be able to provide.</p> <p>Cheers,</p> <p>G.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload