You need to paint the background with the color brush of the system.
SystemColors.ControlBrushKey property will return a ResourceKey for the corresponding SolidColorBrush .
For example, to set the button background, you can use the following code:
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowTitle="SystemColors Example" Background="White"> <StackPanel Margin="20"> <Button Background="{DynamicResource {x:Static SystemColors.DesktopBrushKey}}" Content="Hello, World!" /> </StackPanel> </Page>
source share