I ́m a newbe for ExpressSkins.
How can I find specific colors of the selected skin, that I can use this colors in my own components?
Is it possible to get the source code of the dxSkinsFeaturesDemo application, to see do how you select and apply the skins at runtime?
Thanks
Michael
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.
Hello Michael,
Thank you for the question. Unfortunately, there is no a correct way to obtain a specific skin element's color in a typical case, because most elements are drawn using a bitmap provided by a specific skin element. You can see it if you try to create your own custom skin using the SkinEditor tool shipped with the installation. I also recommend that you review the "How to Create Skins Using the Skin Editor" help topic (ExpressSkins Library\How To…) to better understand this technique. However, you can obtain some common colors from the current skin using the current skin painter. For example:
var AColor: TColor; begin .... AColor := RootLookAndFeel.Painter.DefaultContentColor; end;
You can also obtain the current skin and check its elements:
uses cxLookAndFeelPainters, dxSkinsLookAndFeelPainter; var AColor: TColor; APainter: TcxCustomLookAndFeelPainterClass; APainterInfo: TdxSkinLookAndFeelPainterInfo; ASkin: TdxSkin; begin if GetExtendedStylePainters().GetPainterByName(dxSkinController1.SkinName, APainter) then begin GetExtendedStylePainters().GetPainterData(APainter, APainterInfo); ASkin := APainterInfo.Skin;// GetColorByName GetGroupByName() end; end;
The skins have common colors which are displayed within the Colors page, placed to the right of the SkinEditor. Each skin also has groups whose names are equivalent to the groups you can see within the SkinEditor (e.g. Bars, Common, Docking). A group can be obtained using the skin's GetGroupByName method. Each group may have its own common colors which are displayed on the "Additional" page to the right of the SkinEditor. Using a group's instance, you can obtain the necessary skin element via its GetElementByName method. Each element contains additional information like Color, TextColor, Image etc. A skin element may not have an Image or Color. Depending on the current skin there maybe either an image or color only used.
Please feel free to contact us if you need any additional assistance in this regard. We will be happy to help you.
>>
Is it possible to get the source code of the dxSkinsFeaturesDemo application, to see do how you select and apply the skins at runtime?
<<
To apply a skin to an entire application built with Developer Express controls, use our TdxSkinController or TcxLookAndFeelController component, and assign its SkinName property. I will also send you the source units for the dxSkinsFeaturesDemo in a separate email.
Thanks,
Stan.
Hi Michael,
We have also put the source of the ExpressSkins Features Demo on our FTP server. You can obtain it using the following link:
http://downloads.devexpress.com/Share/Demos/ExpressSkinsWebDemo.zip
Thanks,
Serge