TX Text Control X16 offers a Sidebar control that can be placed inside an application and used as an alternative to dialogs. It can be pinned and unpinned to display the control as a docked sidebar or as a dialog.
For Windows Forms:
╰ Windows.Forms Namespace
╰ Sidebar Class
The Sidebar class represents a container that gives quick access to a control which is either user-defined or a predefined TextControl feature interface.
╰ WPF Namespace
╰ Sidebar Class
The Sidebar class represents a container that gives quick access to a System.Windows.FrameworkElement which is either user-defined or a predefined TextControl feature interface.
Besides the option to create a custom interface, the sidebar provides different pre-defined functional layouts that can be connected to a TextControl. Furthermore, horizontally and vertically docked sidebars can be used with specific ribbon tabs, where the user can toggle a related button to show or hide that control with the corresponding application.
This tutorial shows how to create a simple Windows Forms application with a sidebar layout.
In Visual Studio, create a new Windows Forms application. Find the TextControl in the TX Text Control 26.0 tab of the Visual Studio Toolbox. Drag and drop an instance of TextControl onto a form.
Now, find the Smart Tag in the upper right corner of TextControl and click the following wizards:
- Add a Ribbon
- Add a StatusBar
- Add a Ruler
- Add a Vertical Ruler
Finally, click Arrange Controls Automatically.
Select the ribbon control by clicking the blue File tab. Find the Smart Tag in the upper right corner of the ribbon control and insert the required ribbon tabs.
Find the Sidebar control in the Toolbox and drag and drop an instance onto the form. Find the Smart Tag in the upper right corner and set the Dock property to Right. Then visit the Text Control Smart Tag again and click Arrange Controls Automatically.
In the next step, you can choose the content layout of the sidebar. 6 layouts are pre-defined:
Select your required content layout.
In the sidebar smart tag, connect the sidebar to the inserted TextControl by selecting the TextControl instance textControl1 from the drop-down list at the property TextControl.
You can also customize the style of the sidebar using the Properties window. In the following screenshot, the font size has been changed:
Compile and start your application.
Test this on your own and download a trial version of TX Text Control X16.