Skip to main content Skip to footer

What's New in Studio for WinForms 2011 v1

Desktop development is definitely here to stay as our WinForms controls just keep getting better. The latest release of Studio for WinForms 2011 v1 introduces 3 new controls and adds enhancements to over 10 controls. See what's new. Read below to get a deeper scoop into some of the top new features.

Scheduler Grouping

Grouping appointments in C1Schedule was one of the top requests by developers. Now you can easily create multi-user scheduling applications where appointments are grouped into distinct columns for each resource, contact or category. This feature supports paging so there's no limit to the number of groups.

  • Group by contacts, categories or resources. Just set the GroupBy property.
  • Set the column count (page size) by setting GroupPageSize.
  • Show appointments which are not grouped (unassigned to any contact, category or resource) by setting the ShowEmptyGroupItem property to True.
  • Grouping is supported in any view.
  • Users can assign appointments to more than one group.
  • Users can reassign appointments through the Edit Appointment dialog or by simply draggin and dropping.

If your data model supports an owner field, you can also group on that. C1Schedule has a new Owner property on its Appointment class so you can bind this to a field in your data and then group by this field. In this case you would set the GroupBy property to "Owner" and then supply mapping between your data set and the scheduler. Check out the Grouping and MultiUser samples, which install with the Studio, for full code.

"Super" Error Providing

Familiar with C1SuperTooltip? Well now we've taken the same rich, html formatting functionality and put it in the new C1SuperErrorProvider. This new control works just like the standard ErrorProvider except it allows you to display messages using html formatting. Make error messages clearer to the user by displaying rich fonts, decorators and images in the error tooltips.

C1SuperErrorProvider Super QuickStart

  1. Add a TextBox and a C1SuperErrorProvider on your form (C1SuperErrorProvider appears in the component tray).
  2. In the TextBox (textBox1) TextChanged event, paste the following code:

    private void textBox1_TextChanged(object sender, EventArgs e)  
        if (textBox1.Text.Length < 10)  
                "<strong>This is a <span style="color: red;">required</span> field.</strong>"  
                "Must be at least 10 characters.");  
            c1SuperErrorProvider1.SetError(textBox1, "");  
  3. Run the form and start typing into the TextBox.

Contextual Tab Groups in Ribbon

C1Ribbon now supports multi-colored contextual tabs. You may designate some controls on the Ribbon to only be used in conjunction with a specific object or function on the form, such as a picture, chart or table. You can configure contextual tabs to only appear when a relevant object is selected or a specific action performs. The new ContextualTabGroups collection is available for adding and managing contextual tabs. Toggle each tab groups' visibility in code with the Visible property.

Implementing Contextual Tabs to show/hide

  1. Add a C1Ribbon to your form.
  2. Add two contextual tab groups to the ContextualTabGroups collection.
  3. Make one orange and one green.
  4. Add one Tab to each group's Tabs collection.

  • Add one Group to each Tab.
  • Add two TextBoxes below the ribbon.
  • In the Enter event for each TextBox, paste the following code:

    private void textBox1_Enter(object sender, EventArgs e)  
        ribbonContextualTabGroup1.Visible = true;  
        ribbonContextualTabGroup2.Visible = false;  
    private void textBox2_Enter(object sender, EventArgs e)  
        ribbonContextualTabGroup1.Visible = false;  
        ribbonContextualTabGroup2.Visible = true;  
  • Run the form and notice that a different contextual tab group appears depending on which textbox has focus.

Notice in this sample we show and hide contextual tab groups only when objects receive focus so that when the Ribbon receives focus it does not disrupt our logic.

ComponentOne Product Manager Greg Lutz

Greg Lutz

comments powered by Disqus