Why move
Existing Infragistics subscriptions can still be renewed, and Ultimate UI for Windows Forms is still being released. What changed is how you get a new license: a new developer on the team, or a new project, now needs a suite license, even when the application uses only a few Windows Forms controls. If those controls are tabs, a tree, a multi-column dropdown, masked fields and date fields, our five .NET controls cover them, sold separately or together. See moving from Infragistics Windows Forms for all five.
What you get
SftTabs/NET 3.0 is a tab control for Windows Forms, written entirely in C# and shipped as a single assembly.
- Controls inside the tabs. Buttons, dropdown buttons, check boxes, radio buttons and progress bars in a tab, next to its text and image, with a PartClicked event.
- Close buttons where users look for them. On every tab, on the selected or hot tab only, or on none, plus close, minimize and restore buttons beside the tabs.
- Looks for current applications. Themed, Standard, Flat, Buttons, Underline, Document, Rounded and Pills, colored with one accent color.
- Layouts for many tabs. Tabs on any side, several rows with the tabs distributed or flowing from row to row, rows added as needed so the text of every tab fits, or one row that scrolls.
- Switching under your control. The Switching event validates the focused control first, can cancel the switch or send the user to another tab, and SwitchingDisabled tells you when a disabled tab is clicked.
- Tabs saved and restored. GetContents and SetContents save all tabs and their properties as XML, for layouts that users arrange themselves.
- Tooltips with a title, an icon and a balloon style.
- Modern Windows. The same API and Visual Studio designer support in .NET Framework 4.7 (or later) and .NET 10 (or later) applications. Set one property and the control follows the Windows light/dark setting. It scales with the DPI of the monitor showing it, honors the Windows contrast themes and has built-in UI Automation support for Narrator, NVDA, JAWS and other screen readers.
A license is per developer and royalty-free, sold on its own.
Member mapping
SftTabs/NET is not a drop-in replacement: there are no Appearance objects and no style libraries, and the colors are plain properties of the control and of each tab. Many names will still look familiar. This table shows where each UltraTabControl member is found.
| Task | UltraTabControl | SftTabs/NET 3.0 |
|---|---|---|
| Tabs and pages | Tabs, UltraTab, UltraTab.TabPage (an UltraTabPageControl) | SftTabs.Tabs, TabClass, TabClass.Page (a TabPageClass) |
| Finding a tab | Tabs[key], UltraTab.Key, UltraTab.Index | SftTabs.Tabs[name], TabClass.Name, TabClass.Index |
| Visible and enabled | UltraTab.Visible, UltraTab.Enabled | TabClass.Visible, TabClass.Enabled, and SftTabs.SwitchingDisabled when a disabled tab is clicked |
| Adding and removing tabs | Tabs.Add, Insert, AddRange, Remove, RemoveAt, Clear | SftTabs.Tabs.Add (with a text and an image), Insert, AddRange, Remove, RemoveAt, Clear, TabClass.Remove |
| Batch updates | BeginUpdate, EndUpdate | SftTabs.Initializing |
| Selected tab | SelectedTab, UltraTab.Selected | SftTabs.SelectedTab, SftTabs.SelectedIndex, TabClass.Selected, TabClass.Select |
| Style | Style, TabButtonStyle | SftTabs.Look (Themed, Standard, Flat, Buttons, Underline, Document, Rounded, Pills), SftTabs.AccentColor |
| Position | TabOrientation (TopLeft, BottomRight, LeftTop and others) | SftTabs.TabPosition (Top, Bottom, Left, Right) and SftTabs.TabAlignment (Near, Far) |
| Text direction | TextOrientation | SftTabs.TextOrientation (Default, Horizontal, Vertical) |
| Spacing | TabPadding, SpaceBeforeTabs, SpaceAfterTabs | SftTabs.TabPadding, SftTabs.MarginNear, SftTabs.MarginFar |
| Rows and tab widths | TabLayoutStyle, TabsPerRow, MaxVisibleTabRows | SftTabs.Rows, SftTabs.LayoutMode (Distribute, Flow, AutoFlow), SftTabs.Fixed, SftTabs.TabsPerRow, SftTabs.FillComplete, SftTabs.AutoFlowMaxRows |
| Scroll buttons | ScrollButtons, ScrollButtonAppearance | SftTabs.Scrolling: Enabled, ScrollButtons (Always, Conditional, Hidden), ButtonsPosition, ButtonAppearance |
| Scrolling | FirstDisplayedTab, UltraTab.EnsureTabInView, UltraTab.IsInView, TabScrolled | ScrollingClass.FirstVisibleTab, TabClass.ScrollIntoView, TabClass.Displayed, SftTabs.Scrolled |
| Close buttons on tabs | AllowTabClosing, CloseButtonLocation, TabCloseButtonVisibility | SftTabs.TabCloseButton (None, SelectedOrHot, Always), SftTabs.TabCloseButtonToolTip |
| Close button of one tab | UltraTab.AllowClosing, UltraTab.CloseButtonVisibility | TabClass.CloseButton, TabClass.CloseButtonEnabled |
| Close button beside the tabs | CloseButtonLocation HeaderArea, CloseButtonAppearance | SftTabs.Buttons.CloseButton and the SftTabs.CloseButtonClicked event |
| Closing a tab | UltraTab.Close, TabClosing, TabClosed | SftTabs.TabCloseButtonClicked, then TabClass.Remove (or TabClass.Visible) in your handler, SftTabs.TabRemoved |
| Text and tooltips | UltraTab.Text, UltraTab.ToolTipText, ShowToolTips | TabClass.Text, TabClass.ToolTip, SftTabs.ShowToolTips, SftTabs.ShowToolTip |
| Images | ImageList, UltraTab.Appearance.Image, ImageSize | TabClass.Image, or TabClass.ImageList with TabClass.ImageIndex; images scale with the DPI |
| Tab colors | Appearance, SelectedTabAppearance, UltraTab.Appearance | SftTabs.TabBackColor, SftTabs.TabForeColor, SftTabs.TabBackColorSelected, SftTabs.TabForeColorSelected, SftTabs.BoldSelected, and the same colors on each tab |
| Hot tracking | UseHotTracking, HotTrackAppearance | SftTabs.FlybyHighlight, SftTabs.TabBackColorHot, SftTabs.TabForeColorHot |
| Page colors | ClientAreaAppearance, UltraTab.ClientAreaAppearance | SftTabs.PageBackColor, TabClass.PageBackColor, SftTabs.BorderColor |
| Hit testing | TabFromPoint | SftTabs.TabFromPoint, SftTabs.HitTest, which also reports close buttons and scroll buttons |
| Moving tabs | AllowTabMoving, TabMoved, UltraTab.Reposition | SftTabs.AllowReordering, SftTabs.TabReordered, SftTabs.Tabs.Move |
| Saving the tabs | SaveTabOrderAsXml, LoadTabOrderFromXml | SftTabs.GetContents, SftTabs.SetContents, for the tabs and all their properties |
| Selection events | SelectedTabChanging, SelectedTabChanged | SftTabs.Switching, SftTabs.Switched, SftTabs.SelectedIndexChanged |
| A tab strip without pages | UltraTabStripControl | SftTabs.ClientArea set to false, with SftTabs.Switched |
The same tabs in both
Both examples add three tabs with a text and an image at run time, put a label on the first page, show close buttons, select the second tab and react to the selection and to a tab being closed. With UltraTabControl:
UltraTab general = ultraTabControl1.Tabs.Add("general", "&General");
general.Appearance.Image = imgGeneral;
ultraTabControl1.Tabs.Add("appearance", "&Appearance").Appearance.Image = imgAppearance;
ultraTabControl1.Tabs.Add("network", "&Network").Appearance.Image = imgNetwork;
general.TabPage.Controls.Add(new Label { Text = "General settings", AutoSize = true });
ultraTabControl1.CloseButtonLocation = TabCloseButtonLocation.Tab;
ultraTabControl1.TabCloseButtonVisibility = TabCloseButtonVisibility.Always;
ultraTabControl1.AllowTabClosing = true;
ultraTabControl1.SelectedTabChanged += (s, e) => Text = e.Tab.Text;
ultraTabControl1.TabClosed += (s, e) => Debug.WriteLine(e.Tab.Text + " closed");
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[1];
With SftTabs/NET, the image is set before the text so it is shown in front of it, and the close button's handler decides what closing means:
sftTabs1.Initializing = true;
TabClass general = AddTab("general", "&General", imgGeneral);
AddTab("appearance", "&Appearance", imgAppearance);
AddTab("network", "&Network", imgNetwork);
sftTabs1.Initializing = false;
general.Page.Controls.Add(new Label { Text = "General settings", AutoSize = true });
sftTabs1.TabCloseButton = TabCloseButtonEnum.Always;
sftTabs1.Switched += (s, e) => { if (e.Tab != null) Text = e.Tab.Text; };
sftTabs1.TabCloseButtonClicked += (s, e) => e.Tab.Remove();
sftTabs1.TabRemoved += (s, e) => Debug.WriteLine(e.Tab.Text + " closed");
sftTabs1.SelectedIndex = 1;
private TabClass AddTab(string name, string text, Image image) {
TabClass tab = sftTabs1.Tabs.Add();
tab.Image = image;
tab.Text = text;
tab.Name = name;
return tab;
}
You can also skip most of this code: tabs, pages and the controls on them are set up in the Visual Studio designer, with Add Tab and Remove Tab in the smart tag.
Migration notes
- Your handler decides what closing does. TabCloseButtonClicked is raised when a close button is clicked: call TabClass.Remove, which also disposes the page and its controls, or set TabClass.Visible to false to hide the tab as UltraTab.Close does.
- Tabs is the displayed order. A tab the user moves gets a new Index, and its page moves with it; there is no separate VisibleTabs collection.
- Turn on scrolling for a single row. Set SftTabs.Scrolling.Enabled for one row of tabs that scrolls.
- Switching also follows code. SftTabs.Switching is raised when code changes SelectedIndex or SelectedTab, too, so a handler that cancels or redirects applies to both.
- The arrow keys select. The keyboard moves the selection directly; there is no separate ActiveTab.
Before you start
SftTabs/NET is a tab control, not a tabbed MDI manager: MDI child forms shown as tabs with UltraTabbedMdiManager need code of your own, such as a tab strip on the MDI parent that activates the form of the selected tab.
Try it
The free trial includes the working control and the C# and VB.NET samples. Replace one UltraTabControl in your own forms before you buy. A license is per developer, royalty-free, and includes one year of support and upgrades.
Infragistics, UltraTabControl, UltraTabStripControl and UltraTabbedMdiManager are trademarks of Infragistics, Inc. Softel vdm is not affiliated with Infragistics.
