protected override void InitControl() { instance = this; this.stackPanelChildren = this.GetByName <StackPanel>("StackPanel").Children; if (!IsDesignTime) { this.stackPanelChildren.Clear(); } }