The new TXTextControl.Windows.Forms.ResourceProvider class gives access to the all high resolution images used in the built-in ribbon tabs and toolbars. The ResourceProvider is also returning other built-in resources such as item texts and tooltips.

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:

Loading...

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 an TXTextControl.Windows.Forms.ResourceProvider.ImageSourceSettings object with additional settings for receiving the small image such as the culture or colors for color related resources.

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:

Resource Manager

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:

Resource Manager

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:

Resource Manager

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.

GitHub

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)