ShapeTitleOptions Class
Contains options that define the visibility, text and appearance of shape titles.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v18.1.dll
Declaration
Related API Members
The following members accept/return ShapeTitleOptions objects:
Remarks
An instance of the ShapeTitleOptions class can be accessed via the MapShape.TitleOptions property.
Example
This example demonstrates how to customize shape title options. To do this, customize the required properties from the following list.
- ShapeTitleOptions.Pattern - allows customizing the Pattern used to display a title.
- ShapeTitleOptions.TextColor - allows customizing the title text color.
- ShapeTitleOptions.TextGlowColor - allows customizing the title text glowing color.
- ShapeTitleOptions.Visibility - allows specifying the title visibility.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-customize-shape-title-options-t202086
private void Form1_Load(object sender, System.EventArgs e) {
MapItemStorage storage = new MapItemStorage();
VectorItemsLayer layer = new VectorItemsLayer() {
Data = storage
};
dot = new MapDot() { Size = 100 };
dot.TitleOptions.TextColor = Color.Orange;
dot.TitleOptions.TextGlowColor = Color.Black;
dot.TitleOptions.Pattern = "{Title}";
dot.Attributes.Add(new MapItemAttribute() { Name = "Title", Value = "Hello,\nI am Dot." });
storage.Items.Add(dot);
mapControl1.Layers.Add(layer);
}
Inheritance
Object
ViewStatePersisterCore
BaseOptions
MapNotificationOptions
ShapeTitleOptions
See Also