private void pageSlider1_SelectedPageChanged(object sender, EventArgs e) { PageSliderPage selectedPage = pageSlider1.SelectedPage; pageTitleLabel.Text = selectedPage.Controls[0].Text; // First and only control is our page panel with tiles _CurrentPage = pageSlider1.SelectedPageIndex; // Update command checked state for (int i = 0; i < _Commands.Length; i++) { _Commands[i].Checked = (i == _CurrentPage); } }
private void buttonX1_Click(object sender, EventArgs e) { PageSliderPage page = new PageSliderPage(); pageSlider1.Controls.Add(page); LabelX label = new LabelX(); label.Height = 32; label.Text = "Another page slider page..."; label.Dock = DockStyle.Top; page.Controls.Add(label); // Select it pageSlider1.SelectedPage = page; }