/// <summary> /// 创建指定数目的面板 /// </summary> /// <param name="count">要创建的面板个数</param> private void SetPanel(int count) { try { double marginLeft = this.Width; for (int i = 0; i < count; i++) { PanelControl panel = new PanelControl(marginLeft * i); PageControl page = new PageControl(false); this.maingrid.Children.Add(panel); this.pagingGrid.Children.Add(page); } } catch (Exception ee) { MyWork.NoteLog(ee); } }