Elisa, thanks for your sharing.
Eric,
Currently we have just added the ability for the LegendAdornmentLayer, you can use it directly after you get the latest version of Desktop edition, the attachment is the sample application, there are two things need to notice:
1, For the legend of this sample, you need to set the Image and Text property for each style and other optional properties to make it look better, here is the code below:
LegendItem item1 = new LegendItem();
item1.Image = new GeoImage(@"YourData\legend1.jpg");
item1.Text = "LegendItem1";
item1.ImageTopPadding = 10;
item1.ImageLeftPadding = 10;
item1.TextFont = new GeoFont("Tahoma", 10);
item1.TextSolidBrush = new GeoSolidBrush(GeoColor.SimpleColors.BrightRed);
item1.TextTopPadding = 10;
item1.TextLeftPadding = 10;
item1.ImageMask = new AreaStyle(new GeoPen(GeoColor.SimpleColors.BrightBlue));
item1.TextMask = new AreaStyle(new GeoPen(GeoColor.SimpleColors.DarkOrange));
item1.TopPadding = 10;
item1.LeftPadding = 10;
item1.ImageBottomPadding = 10;
item1.ImageRightPadding = 10;
item1.TextBottomPadding = 10;
item1.TextRightPadding = 10;
According to the code above, you can realize the LegendItem object is for an item on the legend, you can set these properties for the legend item so that it can display correctly. So you need to make your own pictures for all of your class break styles and reference them.
2, I didn’t attach the countries02.shp because of the size limitation of discussion forum, so you need to copy the countries02.shp and related files to the data folder.
If you have any questions when using this sample please let us know again,
Thanks,
James
LegendAdornmentLayer.zip (132 KB)