I would like the application color to depend on the color selected in Windows10.
There is such code:
<Window x:Class="ToDo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:ToDo" mc:Ignorable="d" Title="MainWindow" Height="438" Width="435" Background="#FF129E98"> <Grid Margin="0,0,12,0"> <Button x:Name="button" Content="Add" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="53" Height="35" Click="button_Click"/> <Button x:Name="button1" Content="Edit" HorizontalAlignment="Left" Margin="10,54,0,0" VerticalAlignment="Top" Width="53" Height="35" Click="button1_Click"/> <Button x:Name="button2" Content="Delete" HorizontalAlignment="Left" Margin="10,98,0,0" VerticalAlignment="Top" Width="53" Height="35" Click="button2_Click"/> <DataGrid x:Name="dataGrid" HorizontalAlignment="Left" Margin="68,10,0,0" VerticalAlignment="Top" Height="387" Width="347"/> </Grid> I also found this line, but I don’t know where to write it:
"{DynamicResource {x:Static SystemColors.WindowColorKey}}" I tried this:
<Window.Background> <"{DynamicResource {x:Static SystemColors.WindowColorKey}}"> </Window.Background> But it's not right. Help please, for the first time I create a WPF application.
UPD Used this:
<Window.Background> <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.WindowColorKey}}"/> </Window.Background> 
Background="{DynamicResource {x:Static SystemColors.WindowColorKey}}"inside the Window tag - Andrey NOPTitle="MainWindow" Height="438" Width="435" Background="{DynamicResource {x:Static SystemColors.WindowColorKey}}">and gives an error "#FFFFFFFF" is not a valid value for the "Background" property. - Lets DrumBackground="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"All constants can be found here: msdn.microsoft.com/ru/ru/library/ ... - Andrew NOP