public void DrawIt(LandTerritory passedTerritory) { passedTerritory.getStackPanel().Children.Clear(); passedTerritory.getStackPanel().Orientation = System.Windows.Controls.Orientation.Horizontal; string fileString = ""; foreach (Knight k in passedTerritory.getKnights()) { fileString = "C:\\Users\\User\\Desktop\\GameOfThronesProject\\GameOfThronesUnits\\" + passedTerritory.getHouseOccupied().getName() + "Knight.jpg"; System.Windows.Controls.Image image1 = new System.Windows.Controls.Image(); image1.Source = new BitmapImage(new Uri(fileString, UriKind.RelativeOrAbsolute)); passedTerritory.getStackPanel().Children.Add(image1); } foreach (Infantry i in passedTerritory.getInfantry()) { fileString = "C:\\Users\\User\\Desktop\\GameOfThronesProject\\GameOfThronesUnits\\" + passedTerritory.getHouseOccupied().getName() + "Footman.jpg"; System.Windows.Controls.Image image1 = new System.Windows.Controls.Image(); image1.Source = new BitmapImage(new Uri(fileString, UriKind.RelativeOrAbsolute)); passedTerritory.getStackPanel().Children.Add(image1); } }