protected override void InitializeShell() { base.InitializeShell(); #if SILVERLIGHT Application.Current.RootVisual = (UIElement) Shell; #else Application.Current.MainWindow = (Window) Shell; Application.Current.MainWindow.Show(); #endif }