How can I do this in WPF\'s code-behind?
I just found an ugly solution:
grid1.SetResourceReference(
Control.BackgroundProperty,
SystemColors.DesktopBrushKey);
I hope someone will post a better one (I'd like to see something like grid1.Background = BackgroundBrush, because the syntax of SetResourceReference is a step backwards from Windows Forms).