FilterStyle¶
Namespace: ThinkGeo.Core
public class FilterStyle : Style
Inheritance Object → Style → FilterStyle
Properties¶
Styles¶
Gets the styles.
public Collection<Style> Styles { get; }
Property Value¶
The styles.
Conditions¶
Gets the conditions.
public Collection<FilterCondition> Conditions { get; }
Property Value¶
The conditions.
Name¶
This property gets and set the name of the style.
public string Name { get; set; }
Property Value¶
String
This property gets the name of the style.
Remarks:
This name is not used by the system; it is only for the developer. However, it can be used if you generate your own legend.
IsActive¶
This property gets and sets the active status of the style.
public bool IsActive { get; set; }
Property Value¶
Boolean
This property gets the active status of the style.
Remarks:
If the style is not active then it will not draw.
RequiredColumnNames¶
This property gets the collection of fields that are required for the style.
public Collection<string> RequiredColumnNames { get; }
Property Value¶
This property gets the collection of fields that are required for the
style.
Remarks:
This property gets the collection of fields that are required for the style. These are in addition to any other columns you specify in styles that inherit from this one. For example, if you have use a ValueStyle and it requires a column name for the value comparison, then that column does not need to be in this collection. You only use the RequiredColumnNames for columns you need beyond those required by specific inherited styles.
Filters¶
public Collection<string> Filters { get; }
Property Value¶
Constructors¶
FilterStyle()¶
Initializes a new instance of the FilterStyle class.
public FilterStyle()
Remarks:
This is the default constructor for the style and should be called by inherited classes.
Methods¶
GetRequiredColumnNamesCore()¶
This method returns the column data for each feature that is required for the style to properly draw.
protected Collection<string> GetRequiredColumnNamesCore()
Returns¶
Collection<String>
This method returns a collection of column names that the style needs.
Remarks:
This abstract method is called from the concrete public method GetRequiredFieldNames. In this method, we return the column names that are required for the style to draw the feature properly. For example, if you have a style that colors areas blue when a certain column value is over 100, then you need to be sure you include that column name. This will ensure that the column data is returned to you in the feature when it is ready to draw.
In many of the styles, we add properties to allow the user to specify which field they need; then, in the GetRequiredColumnNamesCore we read that property and add it to the collection.
DrawCore(IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)¶
This method draws the features on the view you provided.
protected void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
Parameters¶
features
IEnumerable<Feature>
This parameter represents the features you want to draw on the view.
canvas
GeoCanvas
This parameter represents the view you want to draw the features on.
labelsInThisLayer
Collection<SimpleCandidate>
The labels will be drawn in the current layer only.
labelsInAllLayers
Collection<SimpleCandidate>
The labels will be drawn in all layers.
Remarks:
This abstract method is called from the concrete public method Draw. In this method, we take the features you passed in and draw them on the view you provided. Each style (based on its properties) may draw each feature differently.
When implementing this abstract method, consider each feature and its column data values. You can use the full power of the GeoCanvas to do the drawing. If you need column data for a feature, be sure to override the GetRequiredColumnNamesCore and add the columns you need to the collection. In many of the styles, we add properties to allow the user to specify which field they need; then, in the GetRequiredColumnNamesCore, we read that property and add it to the collection.
DrawSampleCore(GeoCanvas, DrawingRectangleF)¶
protected void DrawSampleCore(GeoCanvas canvas, DrawingRectangleF drawingExtent)
Parameters¶
canvas
GeoCanvas
drawingExtent
DrawingRectangleF