///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Private Methods ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void addImageContainer() { ImageContainer newImageContainer = new ImageContainer(); newImageContainer.myDelegate = this; newImageContainer.HorizontalAlignment = HorizontalAlignment.Stretch; newImageContainer.VerticalAlignment = VerticalAlignment.Stretch; newImageContainer.Width = Double.NaN; newImageContainer.Height = Double.NaN; newImageContainer.setImageNumberLabel(imageContainersList.Count + 1); RowDefinition newRowDefinition = new RowDefinition(); scrollerContent.RowDefinitions.Add(newRowDefinition); scrollerContent.Children.Add(newImageContainer); Grid.SetRow(newImageContainer, imageContainersList.Count); imageContainersList.Add(newImageContainer); }