KB Article A2966
Visible to All Users

How to get skin images at runtime

Description:
Users of my TreeList can select nodes by checking them. I've implemented this feature via state images. The state image list contains the "checked" and "unchecked" images. However, they are not the same as the images used by the CheckEdit control when skins are enabled. I want to use your skin images. Is it possible to access them programmatically?

Answer:
The solution described below uses inner APIs that may be changed in the future. That is why the correct solution here is to create a custom skin and manually copy required images from this skin folders.

Yes, it's possible. Note that a skin image may contain several elements. For example, the check box image consists of 12 icons for different checkbox states. Individual icons are accessible via the SkinElement.Image.GetImages function. Please explore the attached sample project.
See Also:
How to obtain the color of a particular control's element when skins are used
How to convert a standard color to a color which corresponds to the current skin
How to change one skin element in all available skins

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.