Hi,
In version 10, there were some built-in styles in the Style objects. I used the following code to access them and add them to a symbology grid control.
However, in v14 I now get errors from reflection not being able to convert to the type of item when trying to GetValue().
How do I access built-in styles in v14?
if (styleType.GetType() == typeof(LineStyle))
{
foreach (var style in typeof(LineStyle).GetProperties())
{
LineStyle thisStyle = style.GetValue(style, null) as LineStyle;
galleryControl1.Gallery.Groups[1].Items.Add(new GalleryItem(DrawSampleImage(new Bitmap(width, height), thisStyle),
style.Name, ""));
}
}
Regards,
Damian