You can get objects from Resources in App.xaml like that:
var brush = Application.Current.Resources["NonActivePanelBackgBrush"] as SolidColorBrush;
And use it where you want:
Grid1.Background = brush;
Alternatively you can use FindResource
.
However, WinRT seemed to be missing the FindResource
function which is familiar from WPF. You can use this extension method.( sadly I have not tested it yet)
Grid1.Background = FindResource("NonActivePanelBackgBrush") as SolidColorBrush;