Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I noticed I can get/set an icon for a document type on IContentType.Icon, but I haven't seen how to get the icon color yet. The color being specified in this interface:
Here's an example of the code to get an icon:
// I can get an icon, but not sure how to get the icon color.
var icon = ApplicationContext.Services.ContentTypeService.GetAllContentTypes().First().Icon;
I have already confirmed that the icon color is not a class stored in the Icon property.
Have you found a way to set it programmatically?
In your example, what does the Icon property return? It actually should contain both the class name for the icon it self and the class name for the color. Although, as black is the default color, it's not included in the value if the selected color is black.
So for instance, if you have selected the house icon and chosen a black color, the saved value will be icon-home.
If you instead choose blue as the color, the saved value will be icon-home color-blue.
You can see the supported colors here:
Hope that helps ;)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted