Class ValueItem
This class represents a single value to match and styles to draw.
public class ValueItem
- Inheritance
-
ValueItem
- Inherited Members
Remarks
Value Style:
The ValueStyle allows you to match data in the FeatureSource against a value string. If
the value matches, then we will use the style defined in that item to do the drawing.
For example, let's say you have some data that contains states, and each state is categorized as either a high,
medium or low pollution state. Based on the string values of "High", Medium" and "Low",
we can match on these. If a feature's data for the column matched the string "High", then
we would use the high ValueItem's styles to draw that feature. This can be applied to all
kinds of things, such as road classifications, etc.
This can be somewhat slow because we have to match data from the FeatureSource. If
performance is key, then instead of using the ValueStyle, we recommend that you create a set
custom index for your layer, one index with only "High" elements, one for "Medium" and so on.
Then load each as a separate layer. In this way, you would only have one data set, but
multiple indexes. This is the fastest way if you are working with Shape Files. If you are
working with spatial databases, then we suggest creating a view to segment out each
category.
Constructors
ValueItem()
This is a constructor for the class.
public ValueItem()
Remarks
If you use this constructor, you should set the necessary properties manually.
ValueItem(string, Collection<Style>)
This is a constructor for the class.
public ValueItem(string value, Collection<Style> customStyles)
Parameters
value
stringThis parameter is the value that will match with the data specified for the feature.
customStyles
Collection<Style>This parameter represents the styles you want to draw with if the value matches.
ValueItem(string, AreaStyle)
This is a constructor for the class.
public ValueItem(string value, AreaStyle areaStyle)
Parameters
value
stringThis parameter is the value that will match with the data specified for the feature.
areaStyle
AreaStyleThis parameter is the style you want to draw with if the value matches.
Remarks
It is recommended that you do not use this constructor unless it is absolutely necessary. Instead, you can set the properties directly on the DefaultAreaStyle.
ValueItem(string, LineStyle)
This is a constructor for the class.
public ValueItem(string value, LineStyle lineStyle)
Parameters
value
stringThis parameter is the value that will match with the data specified for the feature.
lineStyle
LineStyleThis parameter is the style you want to draw with if the value matches.
Remarks
It is recommended that you do not use this constructor unless it is absolutely necessary. Instead, you can set the properties directly on the DefaultLineStyle.
ValueItem(string, PointStyle)
This is a constructor for the class.
public ValueItem(string value, PointStyle pointStyle)
Parameters
value
stringThis parameter is the value that will match with the data specified for the feature.
pointStyle
PointStyleThis parameter is the style you want to draw with if the value matches.
Remarks
It is recommended that you do not use this constructor unless it is absolutely necessary. Instead, you can set the properties directly on the DefaultPointStyle.
ValueItem(string, TextStyle)
This is a constructor for the class.
public ValueItem(string value, TextStyle textStyle)
Parameters
value
stringThis parameter is the value that will match with the data specified for the feature.
textStyle
TextStyleThis parameter is the style you want to draw with if the value matches.
Remarks
It is recommended that you do not use this constructor unless it is absolutely necessary. Instead, you can set the properties directly on the DefaultTextStyle.
Properties
CustomStyles
This property gets the collection of custom styles.
public Collection<Style> CustomStyles { get; }
Property Value
- Collection<Style>
This property gets the collection of custom styles.
Remarks
The custom styles allow you to use styles other than the default style properties of the class. In this way, you can use a DotDensityStyle or any other style in the API.
DefaultAreaStyle
This property gets and sets the default AreaStyle. You should use this style if your features are area-based.
public AreaStyle DefaultAreaStyle { get; set; }
Property Value
- AreaStyle
This property gets the default AreaStyle.
Remarks
The default style allows you to directly set properties on the styles without having to create a new style each time. You can start simply by setting properties like color, etc. This makes modifying styles very easy.
DefaultLineStyle
This property gets and sets the default LineStyle. You should use this style if your features are line-based.
public LineStyle DefaultLineStyle { get; set; }
Property Value
- LineStyle
This property gets the default LineStyle.
Remarks
The default style allows you to directly set properties on the styles without having to create a new style each time. You can start simply by setting properties like color, etc. This makes modifying styles very easy.
DefaultPointStyle
This property gets and sets the default PointStyle. You should use this style if your features are point-based.
public PointStyle DefaultPointStyle { get; set; }
Property Value
- PointStyle
This property gets the default LineStyle.
Remarks
The default style allows you to directly set properties on the styles without having to create a new style each time. You can start simply by setting properties like color, etc. This makes modifying styles very easy.
DefaultTextStyle
This property gets and sets the default TextStyle. You should use this style if your features are text-based (such as labels).
public TextStyle DefaultTextStyle { get; set; }
Property Value
- TextStyle
This property gets the default TextStyle.
Remarks
The default style allows you to directly set properties on the styles without having to create a new style each time. You can start simply by setting properties like color, etc. This makes modifying styles very easy.
Value
This property gets and sets the value that we use to match with the feature data. If the value matches, we use the style for this item.
public string Value { get; set; }
Property Value
- string
This property gets the value that we use to match with the feature data.
Remarks
The value must match exactly. If more complex matching is required, we suggest you use the RegexStyle. The RegexStyle enables you to use regular expressions, which are very powerful for fuzzy matching.