using System;
using System.Reflection;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
public class MainClass : Window
{
PropertyInfo[] props;
[STAThread]
public static void Main()
{
Application app = new Application();
app.Run(new MainClass());
}
public MainClass()
{
props = typeof(Brushes).GetProperties(BindingFlags.Public | BindingFlags.Static);
SetTitleAndBackground();
}
void SetTitleAndBackground()
{
Title = props[3].Name;
Background = (Brush) props[0].GetValue(null, null);
}
}