Search code examples
c#wpfflowdocumentflowdocumentreader

How to change the foreground/background color of the find text box in a FlowDocument?


I am using a FlowDocumentReader to view some text, when I try typing in the find text searchbox the foreground is white and so is the background. How can I modify either the foreground or background? I tried modifying the Background and Foreground colors for both FlowDocument and FlowDocumentReader but that doesn't work.

<FlowDocumentReader  Grid.RowSpan="4" Grid.Column="1" Name="flowDocReader" IsFindEnabled="True">
  <FlowDocument Name="flowDoc"/>
</FlowDocumentReader>

Typing enter image description here

Dropwdown arrow

enter image description here


Solution

  • Figured out that the issue was MahApps was set to Dark Theme, So my controls use white as the Foreground color. Simply changing the theme from dark to light did the trick.

    <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />