User Tools

Site Tools


telerik_test

Telerik & Dev Notes

* RadRibbonBar – rrb

http://www.telerik.com/help/winforms/ribbonbar-overview.html

http://www.telerik.com/community/forums/winforms/ribbonbar.aspx
Video: Overview Video

With the RadRibbonBar control you can build user interfaces similar to those used in Microsoft Office.

A screenshot of a computer Description automatically generated

Consider adding a RadRibbonForm to the Solution rather than adding a RadRibbonBar to a regular RadForm.

  • The StartButtonImage property specifies an image to use for the <Start> button in the upper left corner of the control.
  • ‘CommandTabs’ collection defines the ‘RibbonTab’ tabs across the top
  • ‘contextualTabGroup’ collection defines areas across the top of the form. I assume to control tab visibility by context.
  • ‘QuickAccessToolbarItems’ collection defines QAT items
  • ‘StartMenuItems’ collection defines the items under the round <Start> button.
  • ‘StartMenuRightColumnItems’ collection defines the items in the right column under the round <Start> button.
RadRibbonTab – rrbt
  • ‘Items’ collection defines ‘RadRibbonBarGroup’ items - button container groups on the current RadRibbonTab
RadRibbonBarGroup – rrbg

<ul>
<li>
>
<p>
‘Items’ collection defines ‘RadMenuItems’ (controls - buttons, etc) or ‘RadRibbonBarButtonGroup’ containers which include a border and allow vertical orientation.
</p>
</li>
<li>
>
<p>
Set Buttons for AutoSize = False, TextWrap = True and set Size/Width = narrower so the text will wrap
</p>
</li>
<li>
>
<p>
I’m not sure how to center buttons in a group when the group name is wider than the list of buttons.
</p>
</li>
</ul>

RadRibbonBarButtonGroup – rrbbg
  • ‘Orientation’
    • ‘Horizontal’ default. Controls side by side.
    • ‘Vertical’ Allows you to stack controls vertically
  • ‘Items’ collection defines ‘RadMenuItems’ (controls - buttons, etc)

RadButtonElement - rbe - Position text to BottomCenter, enable TextWrap and config an icon

  • Select one or more buttons and set ‘TextAlignment’ = ‘BottomCenter’
  • By default the text sets the button width, but you probably should set size manually. These are good defaults:
    • AutoSize = False
    • TextWrap = True
    • Size/Width = small enough to wrap the text to 2 lines (assuming you also want a small icon). Good values are 64, 74 for a button with 2 lines of text and 61, 60 for buttons with one line of text. These will align the top of the top lines.
    • Size/Height = 66 is a good default. 68 starts to push down the ButtonGroup label but is an acceptable max. Set the ‘Height’ to force single text to line up with the top of the text on 2 line text buttons. Good options are 74 high for buttons with 2 lines of text and 60 for buttons with one line. All this assumes you use in icon on the buttons as well.
    • TextImageRelation – ImageAboveText
    • TextAlignment = BottomCenter.
      • Dealing with buttons with both 1 and 2 lines of text. Maybe better than above, use bottom padding to push single line text up from the bottom. Turn on TextWrap. Set button size to X,66, where x is the width that forces any required text wrap. Set Padding.Top to 2-8 to push the icon down and Padding.Bottom to 0 for buttons with 2 lines of text and 15 for buttons with 1 line of text.
  • ‘Image’ = ??? to set the icon graphic image. Choose “Local resource” | <Import> | browse for graphic and finish. RibbonBar icons should be 32×32 pixels.
    • ‘ImageAlignment’ = TopCenter
    • Padding/Top = 8 (or so) to push the graphic down to the center of the button (assuming the above sizes)

Hide elements of the Ribbon Bar

Add the following code right under ‘InitializeComponent();’ in frmMain() (or whatever the form is called).

// Stick this right after “InitializeComponent();” on the form

// Hide the AppButton (Office Start button or 'File' tab) on the RadRibbonBar

radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;

// Hide the QAT (Quick Access Toolbar) on the RadRibbonBar

radRibbonBar1.RibbonBarElement.QuickAccessToolBar.Visibility = Telerik.WinControls.ElementVisibility.Hidden;

//Hide Title Bar - collapse all 3 elements to hide this bar

richTextEditorRibbonBar.RibbonBarElement.QuickAccessToolBar.Visibility = ElementVisibility.Collapsed;

richTextEditorRibbonBar.RibbonBarElement.ApplicationButtonElement.Visibility = ElementVisibility.Collapsed;

richTextEditorRibbonBar.RibbonBarElement.RibbonCaption.Visibility = ElementVisibility.Collapsed;

// Hide any RibbonBar tab with 'Name' = “Hidden” or where 'Text' contains “Hidden” (just the tab, not content)

foreach (Telerik.WinControls.UI.RibbonTab item in radRibbonBar1.CommandTabs) {

if (item.Text.ToLower().Contains(“hidden”) == true || item.Name.ToLower().Contains(“hidden”) == true)

item.Visibility = Telerik.WinControls.ElementVisibility.Hidden; // sometimes ‘Collapsed’

}

// Shift Tab Groups to the left when the AppButton (Office Start button or 'File' tab) is collapsed

radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

Padding p = radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Padding;

radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Padding = new Padding(0, p.Top, p.Right, p.Bottom);

// Hide the ‘ribbonTab1’ tab on the RadRibbonBar
ribbonTab1.Visibility = Telerik.WinControls.ElementVisibility.Hidden; // sometimes ‘Collapsed’

// Hide the Caret button in the upper right that collapses the RibbonBar

this.radRibbonBar1.RibbonBarElement.ExpandButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

// Select the 1st tab [0] on the RadRibbonBar by default

((Telerik.WinControls.UI.RibbonTab)radRibbonBar1.CommandTabs[0]).IsSelected = true;

Use the ‘Document Outline’ view (<Ctrl>+W, U) to manage a RadRibbonForm.

Managing & Reordering RibbonBar Groups

  • Select the RadRibbonBar, and click the <…> on the CommandTabs Property to open RadRibbonBarCommandTab Collection Editor.
  • Select a RadRibbonBarTab on the left, then click the <…> on the Items property to open the RadItem Collection Editor. <Add> and reorder Groups.
  • Select a RadRibbonBarGroup on the left, then click the <…> on the Items property to open the RadItem Collection Editor. <Add> and reorder buttons, etc.
NOTE: Reordering CommandTabs in the wizard doesn’t seem to work. You can use this code instead:

//The RibbonGroups 'rrbctArchives' and 'rrbctNotes' should be in the 1st and 2nd positions from the left. Telerik support ticket: 1453535 

this.richTextEditorRibbonBar.CommandTabs.Remove(this.rrbctArchives);

this.richTextEditorRibbonBar.CommandTabs.Insert(0, this.rrbctArchives);

richTextEditorRibbonBar.CommandTabs.Remove(this.rrbctNotes);

richTextEditorRibbonBar.CommandTabs.Insert(1, this.rrbctNotes);

Set default selected CommandTab

//Set Default Startup Tab

FIX

Add RadDateTimePicker to RadRibbonBar

This control is not available in the RadRibbonBar Items collection, but you can add it in code.

We wanted 2 date controls followed by a dropdown list of predefined date ranges. Add the dropdown list in the designer, then insert the 2 date controls above it (top down) in code.

A screenshot of a computer Description automatically generated A screenshot of a computer Description automatically generated

public frmMain()

{

    InitializeComponent();

    SetupRibbonFilters();  // add non-standard controls to RadRibbonBar

}

void SetupRibbonFilters()

{

    AddDateTimeControl(“rdtpStartDate”); 

    AddDateTimeControl(“rdtpEndDate”); 

}

void AddDateTimeControl(string controlName)

{

    RadDateTimePicker dtPicker = new RadDateTimePicker();

    dtPicker.Name = controlName;

    //dtPicker.ThemeName = “Office2007Blue”;  // inherits the form theme if not specified

    RadHostItem hostItem = new RadHostItem(dtPicker); // placeholder

    hostItem.MinSize = new Size(135, 25);

    hostItem.MaxSize = new Size(150, 25);

    // rrbbgDateFilter.Items.Add(hostItem);  // add new control to the specified RibbonGroup

    rrbbgDateFilter.Items.Insert(rrbbgDateFilter.Items.Count - 1, hostItem);  // insert new control from top down

}

Add CheckedDropDownList to RadRibbonBar

This control is not available in the RadRibbonBar Items collection, but you can add it in code.

A screenshot of a computer Description automatically generated

public frmMain()

{

    InitializeComponent();

    SetupRibbonFilters();  // add non-standard controls to RadRibbonBar

}

void SetupRibbonFilters()

{

    AddOtherPartyDropDown();

}

void AddOtherPartyDropDown()

{

    Dictionary<int, string> other_parties = new Dictionary<int, string>();  // create sample data

    other_parties.Add(0, “Joe Bob”);

    other_parties.Add(1, “Jim Bob”);

    other_parties.Add(2, “Bob Bob”);

    other_parties.Add(3, “Leroy Bob”);

    AddCheckedDropDownList(“rcddOtherParty”, “key”, “value”, other_parties);

}

void AddCheckedDropDownList(string controlName, string dataMember, string valueMember, object dataSource)

{

    RadCheckedDropDownList rcddList = new RadCheckedDropDownList();

    rcddList.Name = controlName;

    rcddList.DataMember = dataMember;

    rcddList.ValueMember = valueMember;

    rcddList.DataSource = dataSource;

    RadHostItem hostItem = new RadHostItem(rcddList);  // placeholder

    hostItem.MinSize = new Size(150, 25);

    hostItem.MaxSize = new Size(150, 25);

    rbgOtherParty.Items.Add(hostItem);  // add new control to the specified RibbonGroup

}

RadPanorama

http://docs.telerik.com/devtools/winforms/panorama/overview

RadPanorama is a control that displays elements of type RadTileElement in a mosaic manner. This control is inspired by the Metro Start Menu screen of Windows 8.

A screenshot of a computer Description automatically generated

RadShortcut (Hotkeys)

http://docs.telerik.com/devtools/winforms/shortcuts/shortcuts-overview

Almost each application uses the so-called “Shortcuts” – a keyboard combination that triggers a specific action. For a valid shortcut is considered any keyboard combination where a Modifier Key (Ctrl, Alt and Shift or a combination of these) is down and other key(s) is pressed. This semantic is available out-of-the-box in our framework and allows you to seamlessly plug any valid keys combination as an action accelerator. Supported are also the so-called multiple keys shortcuts where the Keys member of each shortcut may be more than one key – e.g. Ctrl + A, S is recognized by the framework. Shortcuts without modifier keys are also supported, but they should be used with caution, since they may be in conflict with other controls which intercept keyboard input.

RadControls Misc

RadBreadCrumb – rbc

RadCarousel

RadClock – rclock

RadDesktopAlert – rda

http://www.telerik.com/help/winforms/desktopalert-overview.html

http://www.telerik.com/community/forums/winforms/desktop-alert.aspx
http://www.telerik.com/help/winforms/desktopalert-getting-started.html
http://tv.telerik.com/watch/winforms/getting-started-with-raddesktopalert - Video- how to get started with RadDesktopAlert.
http://www.telerik.com/help/winforms/allmembers_t_telerik_wincontrols_ui_desktopalertmanager.html
VIDEO: http://www.telerik.com/videos/winforms/getting-started-with-raddesktopalert

RadDesktopAlert component displays a small pop-up window on the screen to notify the user that a specific event has occurred in the application.

A white and green background with black text Description automatically generated

My sample project: \\192.168.93.1\KB_MiM\Telerik\LS.TelerikSystrayApp

Popup notification similar to Outlook’s you have a new email Notify (Notification) popup. You can drag it around the screen. There are three buttons in the upper right to close, pin it to the screen and display a list of options.

For multi-monitor systems use the SetActiveScreen() method of the DesktopAlertManager class to set the screen where alerts display at ‘ScreenPosition’.

You can display multiple alert instances on the screen and the DesktopAlertManager will calculate the alerts’ location so that they do not overlap. Alerts are stacked on the screen in the order of their appearance. When an alert is closed, all related visible alerts are automatically relocated to utilize the screen real estate. To show multiple desktop alerts you must create a new instance for every alert. To replace an alert dispose the instance and create another new one.

int i ; // create multiple instances of the

for (i = 0; i ⇐ 2; i++)

{

RadDesktopAlert a = new RadDesktopAlert();

a.CaptionText = i.ToString();

a.Show();

}

RadDesktopAllert does not support auto-size mode. You must set the size of the control so your contents will fit.

Marcel tried this sample code in eTMsync but it didn’t work for him so he ended up writing his own resize code.

http://www.telerik.com/forums/desktop-alert-not-resizing-accordingly-to-the-contenttext-set

It offers some “HTML-like” formatting but does not support “&nbsp;”. Here is a list of supported tags and expressions.

Here’s a code example to make a clickable hyperlink in the Alert Content.

You can add a button (or other element) to any control, including an Alert. Here’s how to add a button:
RadButtonElement element = new RadButtonElement();

element.Text = “Button”;

element.MaxSize = new Size(20, 20);

this.radDesktopAlert1.Popup.AlertElement.ContentElement.Children.Add(element);

Here’s Color Change examples by choosing an alternate thems or using a customized theme from Visual Style Builder.

You can Preview the Alert in the IDE from the control Smart Tag in the Component Bin.

  • ‘ScreenPosition’ accepts six possible positions from the AlertScreenPosition enumerator: TopLeft, TopCenter, TopRight, BottomLeft, BottomCenter, BottomRight
  • ‘FixedSize’ defaults to 0,0 for a default size. Set this to override the size, or do it in code:

this.radDesktopAlert1.FixedSize = new Size(200, 200);

  • ‘CanMove’ default True, enables the Alert to be dragged with the mouse
  • ‘AutoCloseDelay’ how long to stay on screen (defaults to 10 sec)
  • ‘AutoClose’ whether will disappear after the period of time defined by the property. Set = false to leave open.
  • ‘AlertImage’ specifies an icon that will be shown on the left of the alert panel
  • ‘ButtonItems’ collection adds custom buttons to the alert
  • ‘Opacity’ starting opacity when it appears (defaults to 0.8 – 80%). Changes to 100% on mouse over.
  • ‘PopupAnimation’ = true to enable animations
    • ‘PopupAnimationFrames’ number frames in the popup animation. More frames means longer animation.
    • ‘PopupAnimationDirection’ (default Down) direction of the animation. Down slides down from the initial location. Can aldo have Up, Left or Right.
    • ‘PopupAnimationEasing’ different animation easing effects which are used to start and finish the animation.
  • ‘FadeAnimationType‘ (default ‘FadeIn,FadeOut ‘)accepts values from FadeAnimationType enum which also allows for combinations of its values.
  • You can also use the FadeAnimationFrames property to define the amount of frames used to animate the opacity of the alert’s popup. By increasing the amount of frames you will increase the duration of the fade animation.
  • Caption Buttons
    • ‘CloseButton’ closes the alert. Use ShowCloseButton to show/hide the button.
    • ‘PinButton’ pin the alert on the screen and prevent it from being closed automatically. ShowPinButton to show/hide the button.
    • ‘OptionsButton’ displays a drop-down menu with user-defined content from the OptionItems collection. Use ShowOptionsButton to show/hide the button.

RadHScrollBar – rhsb

+-* RadLabel – rlbl

http://www.telerik.com/help/winforms/panels-and-labels-label-overview.html

http://www.telerik.com/community/forums/winforms/panels-and-labels.aspx

Telerik themeable label with HTML-like formatting capability. Also see this video.

A black text on a white background Description automatically generated

NOTE: Our design policy it to only change the control name from default if we will programmatically change the text.

  • 'Text' \Behavior
  • 'Name' \Design
  • 'Location' \Layout
  • 'Size' \Layout
  • Multiline RadLabel - Set 'Auto Size' = False and ‘TextWrap’ = True. Then go directly to the 'Size' and enter 50,50, or you can drag the box size. Don't embed \n in the text. Or dock the label to a container to set the size.

Custom Text Formatting via MarkupEditor

http://www.telerik.com/help/winforms/panels-and-labels-label-html-like-text-formatting.html

  • For example making one word in a sentence bold. Click the down arrow on the 'Text' value and click <Start MarkupEditor>.
  • Use <Shift><Enter> for new lines. It will generate HTML. The font changes made here (color, etc) are not the same properties as those in the Properties window.

Set these RadLabel properties and double click the label to stub out a click event.

  • ‘ForeColor’ = ‘HotTrack’ - a blue visible under the color dropdown ‘System’ tab
  • ‘Underline’ – ‘True’

Instead of LinkLabel see the <Links> button on the ‘MarkupEditor’ behind the ‘RadLabel.Text’ property dropdown and open locations without additional code.

  • Choose link ‘Type’ of ‘http://’ or ‘https://’ and enter a web url there and the link works with no extra code. The .Text generated markup looks like this:
<a href="http:%%//%%www.legalitysoftware.com/">Legality Software</a>

<a href=“http://www.legalitysoftware.com/”><span style=“color: #d86040”>Legality Software</span></a> - orange font in Wizards (NOTE: Set ‘BackColor’ = 225, 228, 240 to match wizard form)

<a href="http:%%//%%support.lawtopia.net/">View log files</a>
  • Choose link ‘Type’ of ‘mailto:’ and enter an email address to open an email in the default client.
  • Choose link ‘Type’ of ‘(other)’ and enter a local file path to pop the Windows Explorer in the location.. The .Text generated markup looks like this:
<a href="file:%%//%%/C:/DevGit">View log files</a>
  • Make only part of the label a clickable link like this:
Click this <a href="file:%%//%%/C:/DevGit">View log files</a> to open Windows Explorer

Here’s the HTML for our company blurb for wizard pages, etc. (Set ‘TextAlignment’ = MiddleCenter):

<p><span style=“font-size: 10pt; color: #00467f”><em>Legality Software provides packaged software products and custom software solutions for law firms. Our solutions typically enhance the capabilities of, or fix problems with, the tools you use in your firm today. We also help firms automate difficult, time consuming or repetitive tasks. Legality products and solutions are designed to solve your problems so you can achieve your goals. </em></span></p><p><span style=“color: #00467f”><span style=“font-size: 10pt”><em>If you have a specific problem we may already have a solution. <br /></em></span><span style=“font-size: 10pt”><em>If not we can build one for you.</em></span></span></p><p><span style=“font-size: 13px”><span style=“font-size: 10pt”><br /><span style=“color: #00467f”>Visit </span></span><a href=“http://www.legalitysoftware.com/”><span style=“font-size: 10pt”>Legality Software</span></a><span style=“font-size: 10pt; color: #00467f”> to learn more.</span></span></p>

A screenshot of a software Description automatically generated

### I DON'T KNOW HOW TO CENTER TEXT IN A MULTI-LINE LABEL

Dynamically Add Text to a Label

### grab code from TMFU

Dynamically Replace some Placeholder Text in a Label

### grab code from TMFU & ask Larry how he worked out the issue with the Placeholder Text is not there for the 2nd replace

RadPrintDocument – rpd

RadProgressBar – rpb

http://www.telerik.com/help/winforms/track-and-status-controls-progressbar-overview.html

http://www.telerik.com/community/forums/winforms/track-and-status.aspx

RadProgressBar is designed to display progress information to the user during a long-running operation.

A screenshot of a progress bar Description automatically generated

### Need an example

RadWaitingBar – rwb

http://www.telerik.com/help/winforms/track-and-status-controls-waitingbar-overview.html

http://www.telerik.com/community/forums/winforms/track-and-status.aspx
http://docs.telerik.com/devtools/winforms/track-and-status-controls/waitingbar/waitingbar
http://docs.telerik.com/devtools/winforms/track-and-status-controls/waitingbar/properties-and-methods

Like a progress bar but with no start or end. It just shows activity.

A green and white striped object Description automatically generated

Properties

  • ‘WaitingStyle’ – Indeterminate, Throbber, Dash
  • ‘WaitingSpeed’ – (90) animation speed
  • ‘WaitingStep’ – (1) number of pixels to move for each step
  • ‘.Text’ – background text on the waiting bar – set ‘ShowText’ = true to make it visible
  • ‘StretchIndicatorsHorizontally’ – inverses the color on the shaded scrolling indicator for a nice effect
The ‘WaitingBarIndicatorElement’ is the sliding part, which has:
  • Its own ‘.Text’ property making the text scroll with the colored highlight.
  • ‘ShouldPaint’ which hides the slider (even though it still moves) returning the waiting bar to a solid color – use this and the StartWaiting()/StopWaiting() methods to indicate the process is finished. See note below about multiple elements…
NOTE: A RadWaitingBar may (does) have more than 1 ‘WaitingBarIndicatorElement’, named ‘WaitingBarIndicatorElement1’ and ‘WaitingBarIndicatorElement2’ so if you use ‘ShouldPaint’, besure to change both instances.

Methods

  • StartWaiting() method starts the animation
  • StopWaiting() method stops the animation
  • ResetWaiting() method moves the waiting indicators to their initial position.

### Add an example here from HLS PdfParser

RadRating

http://docs.telerik.com/devtools/winforms/track-and-status-controls/rating/rating

RadRating is a flexible UI component that allows users to place their rating by selecting from a finite number of items (stars, diamonds and hearts). The developers can fully customize the control by configuring its orientation, rating precision, direction etc.

A screenshot of a computer Description automatically generated

RadRotator – rrot

http://docs.telerik.com/devtools/winforms/rotator/overview

RadRotator is a multipurpose component for content rotation and personalization. Highly customizable, it delivers high interactivity and user involvement. You can display a series of images, web URLs or any collection of rad elements. Animation between frames can be opaque or transparent and the movement can be in any direction. You can adjust the level of granularity and interval between frames.

A screenshot of a computer Description automatically generated

RadTitleBar – rtb

http://www.telerik.com/help/winforms/forms-and-dialogs-radtitlebar-overview.html

http://www.telerik.com/community/forums/winforms/forms-and-dialogs.aspx

RadTitleBar control is used in forms and provides functionality for dragging, minimizing, maximizing and closing the form. This control is internally used by RadForm.

To include a title bar with help, maximize, minimize and close button functionality simply drag it from the toolbox on the desired form. This control is great addition to the ShapedForm.

To customize the help, minimize, maximize and close buttons, use the RadTitleBar.TitleBarElement's HelpButton, MinimizeButton, MaximizeButton and CloseButton objects. Each button is a RadButtonElement type that include properties to control text, image, and layout.

A green line on a white background Description automatically generated

Note: By default, the HelpButton is not shown. It is necessary to set its Visibility property to ElementVisibility.Visible in order to be displayed.

RadVScrollBar – rvsb

http://www.telerik.com/help/winforms/track-and-status-controls-scrollbar-overview.html

http://www.telerik.com/community/forums/winforms/track-and-status.aspx

http://www.telerik.com/help/winforms/track-and-status-controls-scrollbar-getting-started.html

Using Telerik scrollbars is a bit more intricate compared to using the standard scrollbars because you have to handle scroll event manually. Add a RadPanel to your form then add a RadVScrollbar in the panel and dock it to the Right. Add another RadPanel inside the 1st RadPanel and set its height to the total height you want to be available upon scrolling (taller than the 1st RadPanel). This value can be statics e.g. 1000 pixels or dynamic determined by the scrollable content. Now add controls (the controls which are to be scrolled) to the second RadPanel.

A white background with black squares Description automatically generated

Then subscribe to the Scroll event of the vertical scrollbar and assign its negated value to the Top property of the second RadPanel:

void radVScrollBar1_Scroll(object sender, ScrollEventArgs e)

{

this.radPanel2.Top = -this.radVScrollBar1.Value;

}

Finally, set the Maximum property of the scrollbar to reflect the size of the scrollable height which is the total height of the scrollable content minus the visible height. For the example of this section in particular, that is the height of the second panel minus the height of the first panel.

this.radVScrollBar1.Maximum = this.radPanel2.Size.Height - this.radPanel1.Size.Height;

* RadWizard – rw

http://www.telerik.com/help/winforms/wizard-overview.html

http://www.telerik.com/community/forums/winforms/wizard.aspx
Design Time Settings http://www.telerik.com/help/winforms/wizard-design-time.html

Wizard dialog with multiple pages and <Back><Next> buttons.

A screenshot of a computer Description automatically generated

  • Could leave as default assigned name unless we will use more than one Wizard in a project.
  • Drag this container to a regular form to create a Wizard.

Properties

  • ‘Mode’ - Wizard97 for the header panel we use, or Aero for a header with nav buttons at the top

Quick Tasks Button

  • 'Edit Pages' - use this instead of 'Add Page'. It gives you more control. You should add Welcome, Working (Wizard), and Completion pages.
    • This seems backwards but the 'Title' is the big text on top and the 'Header' is the smaller text under the Title.
  • Use the <Back>/<Next> buttons on the actual form to navigate in design time.
Another option is to click page name in 'Pages' Collection Editor to jump/view.

### I’m not sure how to change the “Help” hyperlink in the lower left corner.

Contains the following elements:

  • Pages collection – collection which contains Internal, Welcome and Completion RadWizard pages.
  • Page header – element which is located above each page and contains elements for title text, header text and page icon.
  • Command area – element which is located below each page and contains command button – Back (Wizard 97), Next, Cancel, Finish, and Help.
  • Welcome image – element which contains the image of the Welcome page.
  • Completion image - element which contains the image of the Completion page.
  • Top element – element which contains the Back button of Wizard Aero view.

Events - help you to follow the state of the control at run time, implement custom pages sequence and page processing validation.
http://www.telerik.com/help/winforms/wizard-events.html

  • ModeChanging - Fires before the mode of RadWizard is changed. It is cancelable event. The arguments of the event provide the current and the next WizardMode.
  • ModeChanged - Fires after the mode of RadWizard is changed. The arguments of the event provide the previous and the current WizardMode.
  • Next - Fires when the Next command button is clicked. It is cancelable event.
Add custom/Validation functionality to Wizard Next Button

Subscribe to the Next event

this.radWizard1.Next += new WizardCancelEventHandler(radWizard1_Next);

Handle the Next event

private void radWizard1_Next(object sender, WizardCancelEventArgs e)

{

if (this.radWizard1.SelectedPage == this.radWizard1.Pages[1]) // Check if this is the desired page

{

// Do some validation here

e.Cancel = true; // If the validation does not pass

this.radWizard1.SelectedPage = this.radWizard1.Pages[0]; // Could return to 1st page

// Or you could show some message to the user

}

}
  • Previous - Fires when the Back command button is clicked. It is cancelable event.
  • SelectedPageChanging - Fires before the selected page of RadWizard is changed. It is cancelable event. The arguments of the event provide the selected page of the control and the page to be selected.
  • SelectedPageChanged - Fires after the selected page of RadWizard is changed. The arguments of the event provide the previous selected page and the selected page of the control.
  • Finish - Fires when the Finish command button is clicked.
  • Cancel - Fires when the Cancel command button is clicked.
  • Help - Fires when the Help command button is clicked.

Custom Page Branching Sample Project

Custom CommandArea Controls like Navigation Buttons

Create multiple Welcome or Completion pages

  • ‘WelcomePage’ - Select one of multiple Welcome pages
  • ‘WelcomePage.Name’ – Provide a rwppagenameWelcomePage style name from one of multiple Welcome pages
  • ‘CompletionPage’ - Select one of multiple Completionpages
  • ‘CompletionPage.Name’ – Provide a rwppagenameCompletionPage style name from one of multiple Completionpages
  • Edit one of the alternate pages by selecting it from the Quick Task ‘Edit Pages’ list or ‘Pages’ collection, then click <Cancel> (believe it or not). If you click <OK> it will jump to a different page.

RadWizardPage - rwp

Only change from default if we will programmatically change the text)
telerik_test.txt · Last modified: 2024/02/10 19:44 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki