This is a migrated thread and some comments may be shown as answers.

Controls display in multiple pages in RadWizard

3 Answers 145 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
SoniTek
Top achievements
Rank 1
SoniTek asked on 28 Sep 2012, 02:47 PM
Is there a way to display the same control in RadWizard pages.

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Sep 2012, 11:03 AM
Hi Dzung,

Thank you for writing.

Yes, you can do that. Here is how to use one and the same RadButton in all pages of the wizard:
public partial class Form1 : Form
{
    RadButton radButton1;
 
    public Form1()
    {
        InitializeComponent();
 
        radButton1 = new RadButton();
        radButton1.Text = "hello";
 
        wizardWelcomePage1.ContentArea.Controls.Add(radButton1);
        radWizard1.SelectedPageChanging += new SelectedPageChangingEventHandler(radWizard1_SelectedPageChanging);
    }
 
    void radWizard1_SelectedPageChanging(object sender, SelectedPageChangingEventArgs e)
    {
        e.NextPage.ContentArea.Controls.Add(radButton1);
    }
}

I hope this helps.
 
All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
SoniTek
Top achievements
Rank 1
answered on 01 Oct 2012, 03:06 PM
Hi stefan,

Thanks for the idea. I went with this and it seems to work.

#Region "Initialization"
  
    Public Sub New()
  
        ' This call is required by the designer.
        InitializeComponent()
  
        ' Add any initialization after the InitializeComponent() call.
    End Sub
  
    Protected Overrides Sub OnLoad(e As System.EventArgs)
        MyBase.OnLoad(e)
  
        AddHandler RadWizard1.SelectedPageChanged, AddressOf RadWizard1_SelectedPageChanged
        AddHandler RadWizard1.SelectedPageChanging, AddressOf RadWizard1_SelectedPageChanging
    End Sub
#End Region

 

 

Private Sub RadWizard1_SelectedPageChanging(sender As Object, e As SelectedPageChangingEventArgs)

 

    e.NextPage.ContentArea.Controls.Add(

 

Me.RadButton1)

 

 

 

End Sub

 

0
Stefan
Telerik team
answered on 04 Oct 2012, 01:04 PM
I am glad I could help SoniTek. Let us know if you need anything else.

All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
Wizard
Asked by
SoniTek
Top achievements
Rank 1
Answers by
Stefan
Telerik team
SoniTek
Top achievements
Rank 1
Share this question
or