public virtual int AddControl(Control control) { stackPanel.Children.Add(control); return stackPanel.Children.Count; } }