Skip to content

Instantly share code, notes, and snippets.

@dtwk2
Last active March 27, 2020 15:07
Show Gist options
  • Save dtwk2/9f1dd8ee2d790a1692482883e272785f to your computer and use it in GitHub Desktop.
Save dtwk2/9f1dd8ee2d790a1692482883e272785f to your computer and use it in GitHub Desktop.
How to set the background for all usercontrols in app resources (white background: using dark mode)
<!--https://stackoverflow.com/questions/5183801/black-background-for-xaml-editor-->
<Application
...
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=PresentationFramework">
...
<Application.Resources>
...
<Style TargetType="Control">
<Style.Triggers>
<Trigger Property="componentModel:DesignerProperties.IsInDesignMode"
Value="True">
<Setter Property="Background" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment