Navigation Buttons

3 posts, 0 answers
  1. Carl
    Carl avatar
    1 posts
    Member since:
    Oct 2011

    Posted 03 Oct 2011 Link to this post

    The RadWizard has a couple of buttons by default added to the CommandArea of the RadWizard: the BackButton, the CancelButton, the FinalButton, the HelpButton, and the NextButton...

    I would like to add another (custom) button (which has the look and feel of the buttons I just mentioned above / different text) which launches off a process and eventually returns.... I was wondering if there is an easy way to do this? I've been messing around for a few hours now and I'm able to add a "Test" button; however, it is not in the correct order (I would like it to appear between the Next/Back buttons and it's size is being changed during runtime (I'm assuming this is something to do with the CommandArea object's LayoutManager?)) - see the attached screenshot

    I've also wondered if re-purposing (changing the text) of one of the buttons I've hidden may do the trick.... I have a few problems with this:

    • It seems a bit "hackish" 
    • I'm not sure if/how many more buttons we will need to add in the future; however, I do know there's the possibility of running out of buttons to "re-purpose" if we go above three custom buttons

    Any help / suggestions would be greatly appreciated.


  2. Alexander
    Alexander avatar
    306 posts

    Posted 05 Oct 2011 Link to this post

    Hello Carl,

    Thank you for your question.

    You can easily add a custom RadButtonElement (or other TPF element) to WizardCommandArea using code like the following:
    RadButtonElement radButtonElement1 = new RadButtonElement();
    radButtonElement1.Text = "Button";
    radButtonElement1.MinSize = new Size(100, 24);
    radButtonElement1.Alignment = ContentAlignment.MiddleRight;
    radButtonElement1.Margin = new Padding(4, 0, 4, 0);

    Defining the MinSize of the element helps you identify its size. Using its Alignment property you can position the button left or right in the command area. You can insert the element in a specific position in the CommandElements list to identify its position according to the other command area elements.

    You can add different elements to the command area. Following is an example with RadDropDownListElement:
    RadDropDownListElement radDropDownListElement = new RadDropDownListElement();
    radDropDownListElement.MinSize = new Size(100, 24);
    radDropDownListElement.Alignment = ContentAlignment.MiddleRight;
    radDropDownListElement.Margin = new Padding(4, 0, 4, 0);

    I hope it helps.

    Best regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Holger Boskugel
    Holger Boskugel avatar
    27 posts
    Member since:
    Apr 2012

    Posted 03 May 2012 Link to this post


    one comment: If I look in this.radWizard1.CommandArea.CommandElements collection, there are WizardCommandAreaButtonElement placed. So I think should use this.

    At the moment I implement such additional button, works fine.

    Thanks for this helpfully thread!

    Regards from Berlin

    Holger Boskugel
Back to Top