X17: Using the Windows Forms Resource Provider
The new ResourceProvider class gives access to the all high resolution images used in the built-in ribbon tabs and toolbars.

The new TXText
This way, you can use all TX Text Control resources in other user interfaces to provide a consistent user experience. The ResourceProvider allows developers to request a specific resource with a custom resolution, a culture and colors for icons that provide color settings such as "Text Color" or "Text Highlight Color".
The following code creates a small bitmap with a 16px raster for the resolution of 96 DPI:
ImageSourceSettings m_ImageSourceSettings = new ImageSourceSettings();
Bitmap bmp = GetSmallIcon("TXITEM_Print", 96, m_ImageSourceSettings);
The first parameter is the identifier of the item that is associated with the requested small icon. All items have a unique identifier listed in the documentation. The second parameter specifies the resolution that is used to create the requested icon. And the third parameter can be used to specify a TXText
To help you finding the proper item name (identifier), we published a Resource Manager tool that lists all available types and their items. The following screenshot shows this tool:
In the drop-down list Selected Ribbon Tab, you can choose the various ribbon tabs and other available collections. After selecting a type, all available icons are listed in the panel:
Now, you can use the mouse to hover over the icons in the panel. The name of the selected item is displayed in a text box, can be selected and copied to the clipboard for your usage:
The project can be downloaded from our GitHub account. If you are interested, it also shows how to iterate through the different collections and how to retrieve the resources.
Also See
This post references the following in the documentation:
- TXText
Control. Windows. Forms. Resource Provider Class - TXText
Control. Windows. Forms. Resource Provider. Image Source Settings Class
Download and Fork This Sample on GitHub
We proudly host our sample code on github.com/TextControl.
Please fork and contribute.
Requirements for this sample
- Visual Studio 2017 or better
- TX Text Control .NET for Windows Forms X17 (trial sufficient)
Windows Forms
Text Control combines the power of a reporting tool and an easy-to-use WYSIWYG word processor - fully programmable and embeddable in your Windows Forms application. TX Text Control .NET for Windows Forms is a royalty-free, fully programmable rich edit control that offers developers a broad range of word processing features in a reusable component for Visual Studio.
Related Posts
TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version
TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…
Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5
TX Text Control 33.0 Service Pack 1 and TX Text Control 32.0 Service Pack 5 have been released, providing important updates and bug fixes across platforms. These service packs improve the…
The Wait is Over: TX Text Control for Linux is Officially Here
We are very excited to announce the release of TX Text Control 33.0 which includes the long awaited Linux version of TX Text Control. This version allows you to integrate TX Text Control into your…
Full .NET 9 Support in Text Control .NET Components for ASP.NET Core,…
.NET 9 will be launched tomorrow, November 12, at the .NET Conf 2024 with updates to cloud capabilities, security, and performance. TX Text Control .NET components are fully compatible with .NET 9…