def InitializeComponent(self, skin): #set up the data model self.dataModel = DataModel(self) w = Window() w.Show() w.Title = "IronTunes" w.DataContext = self.dataModel w.Content = LoadXaml(skin) #w.SizeToContent = SizeToContent.WidthAndHeight self.mywindow = IronTunesWindow(self.dataModel) self.mywindow.enliven(w)
class IronTunesApp(Application): #namespace def InitializeComponent(self, skin): #set up the data model self.dataModel = DataModel(self) w = Window() w.Show() w.Title = "IronTunes" w.DataContext = self.dataModel w.Content = LoadXaml(skin) #w.SizeToContent = SizeToContent.WidthAndHeight self.mywindow = IronTunesWindow(self.dataModel) self.mywindow.enliven(w) @staticmethod def RealEntryPoint(skin): app = IronTunesApp() app.InitializeComponent(skin) app.Run()