void AddMissingElements(List<AxisLabel> List, int count) { var style = Collection.Style.GetWpfStyle(); var visible = this.Visible.ToVisibility(); var children = Drawing.Canvas.Children; for (int i = 0; i < count; i++) { var newLabel = new AxisLabel(); List.Add(newLabel); TextBlock textBlock = newLabel.TextBlock; textBlock.Visibility = visible; textBlock.Apply(style); children.Add(textBlock); } }