void OnLoaded(object sender, RoutedEventArgs e) { Initialize(); //add border int borderWidth = (int)(ScreenHeight * .05f); border = new Border(ScreenWidth, ScreenHeight, borderWidth, ScreenCenter); border.Load(this, physicsSimulator); }