ShapeTitleOptions.Pattern Property
Gets or sets the pattern for shape titles.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A String value. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to Pattern |
---|---|
MapShape |
|
Remarks
This property allows specifying text displaying as a title of a vector item. Also it allows using attributes to show them inside the title.
Example
This example demonstrates how to customize shape title options. To do this, customize the required properties from the following list.
ShapeTitleOptions.Pattern
- specifies the Pattern used to construct title text.- ShapeTitleOptions.TextColor - specifies the title text color.
- ShapeTitleOptions.TextGlowColor - specifies the glow color for the title text.
- ShapeTitleOptions.Visibility - specifies title visibility.
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraMap;
// ...
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);
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Pattern property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.