private void PageRun(int i) { if (i >= this.GetViewCount()) { i = this.GetViewCount() - 1; } if (i < 0) { i = 0; } StoryBoard board = new StoryBoard(this.panDock); StoryBoard.ControlAnimation item = new StoryBoard.ControlAnimation { animation = new AnimationPoint(this.PanList.Location, new Point(-i * this.PageWidth, this.PanList.Location.Y), 150), control = this.PanList, name = "Location" }; board.Add(item); board.Start(); this.ViewIndex = i; base.Invalidate(); }