====== ThinkGeo.MapSuite.WindowsPhoneCore.GradientStyle ====== {{section>upgrade_map_suite_to_10.0}} This gradient style is a new style with the concept of GradientBrush. By specifying the LowerValue and its color, as well as the UpperValue and its color, we can set the color of each feature based on a column value using linear interpolation. ===== Inheritance Hierarchy ===== *System.Object **[[ThinkGeo.MapSuite.WindowsPhoneCore.Style]] ***[[ThinkGeo.MapSuite.WindowsPhoneCore.GradientStyle]] ===== Members Summary ===== ==== Public Constructors ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ | {{wiki:PublicMethod.gif|Public Method}}[[#GradientStyle(String, Double, GeoSolidBrush, Double, GeoSolidBrush)|GradientStyle]] | String, Double, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]], Double, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | This constructor creates a new instance by passing the ColumnName (which it will get the data from) as well as the lowerValue and its corresponding SolidBrush, and the upperValue and its corresponding SolidBrush. | | {{wiki:PublicMethod.gif|Public Method}}[[#GradientStyle(String, Double, GeoSolidBrush, Double, GeoSolidBrush, Double, GeoSolidBrush)|GradientStyle]] | String, Double, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]], Double, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]], Double, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | This constructor creates a new instance by passing the ColumnName (which it will get the data from) as well as the lowerValue and its corresponding SolidBrush, the upperValue and its corresponding SolidBrush, and the NoDataValue and its corresponding SolidBrush. | ==== Protected Constructors ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ ==== Public Methods ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ | {{wiki:PublicMethod.gif|Public Method}}[[#Draw(IEnumerable, GeoCanvas, Collection, Collection)|Draw]] | IEnumerable<[[ThinkGeo.MapSuite.WindowsPhoneCore.BaseShape|BaseShape]]>, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]], Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]>, Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | This method draws the shapes on the canvas you provided. | | {{wiki:PublicMethod.gif|Public Method}}[[#Draw(IEnumerable, GeoCanvas, Collection, Collection)|Draw]] | IEnumerable<[[ThinkGeo.MapSuite.WindowsPhoneCore.Feature|Feature]]>, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]], Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]>, Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | This method draws the features on the canvas you provided. | | {{wiki:PublicMethod.gif|Public Method}}[[#DrawSample(GeoCanvas, DrawingRectangleF)|DrawSample]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]], [[ThinkGeo.MapSuite.WindowsPhoneCore.DrawingRectangleF|DrawingRectangleF]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | | | {{wiki:PublicMethod.gif|Public Method}}[[#Equals(Object)|Equals]] | Object | Object | | | {{wiki:PublicMethod.gif|Public Method}}[[#GetHashCode()|GetHashCode]] | | Object | | | {{wiki:PublicMethod.gif|Public Method}}[[#GetRequiredColumnNames()|GetRequiredColumnNames]] | | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | This method returns the column data for each feature that is required for the style to properly draw. | | {{wiki:PublicMethod.gif|Public Method}}[[#GetType()|GetType]] | | Object | | | {{wiki:PublicMethod.gif|Public Method}}[[#ToString()|ToString]] | | Object | | ==== Protected Methods ==== ^ Name ^ Parameters ^ DeclaringType ^ Summary ^ | {{wiki:ProtectedMethod.gif|Protected Method}}[[#DrawCore(IEnumerable, GeoCanvas, Collection, Collection)|DrawCore]] | IEnumerable<[[ThinkGeo.MapSuite.WindowsPhoneCore.Feature|Feature]]>, [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]], Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]>, Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]](overriden) | This method draws the features on the canvas you provided. | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#DrawSampleCore(GeoCanvas, DrawingRectangleF)|DrawSampleCore]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]], [[ThinkGeo.MapSuite.WindowsPhoneCore.DrawingRectangleF|DrawingRectangleF]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#Finalize()|Finalize]] | | Object | | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#GetRequiredColumnNamesCore()|GetRequiredColumnNamesCore]] | | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]](overriden) | This method returns the column data for each feature that is required for the style to properly draw. | | {{wiki:ProtectedMethod.gif|Protected Method}}[[#MemberwiseClone()|MemberwiseClone]] | | Object | | ==== Public Properties ==== ^ Name ^ Return ^ DeclaringType ^ Summary ^ | {{wiki:PublicProperty.gif|Public Property}}[[#ColumnName|ColumnName]] | String | | This property gets and sets the column name used in the style. | | {{wiki:PublicProperty.gif|Public Property}}[[#IsActive|IsActive]] | Boolean | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | This property gets and sets the active status of the style. | | {{wiki:PublicProperty.gif|Public Property}}[[#LowerGeoSolidBrush|LowerGeoSolidBrush]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | This property gets and sets the solid brush that is used for the style's lower value. | | {{wiki:PublicProperty.gif|Public Property}}[[#LowerValue|LowerValue]] | Double | | This property gets and sets the lower value used in the style. | | {{wiki:PublicProperty.gif|Public Property}}[[#Name|Name]] | String | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | This property gets and set the name of the style. | | {{wiki:PublicProperty.gif|Public Property}}[[#NoDataSolidBrush|NoDataSolidBrush]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | This property gets and sets the solid brush that is used for the style's NoDataValue. | | {{wiki:PublicProperty.gif|Public Property}}[[#NoDataValue|NoDataValue]] | Double | | This property gets and sets the no data value used in the style. | | {{wiki:PublicProperty.gif|Public Property}}[[#RequiredColumnNames|RequiredColumnNames]] | Collection | [[ThinkGeo.MapSuite.WindowsPhoneCore.Style|Style]] | This property gets the collection of fields that are required for the style. | | {{wiki:PublicProperty.gif|Public Property}}[[#UpperGeoSolidBrush|UpperGeoSolidBrush]] | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | This property gets and sets the solid brush that is used for the style's upper value. | | {{wiki:PublicProperty.gif|Public Property}}[[#UpperValue|UpperValue]] | Double | | This property gets and sets the upper value used in the style. | ==== Protected Properties ==== ^ Name ^ Return ^ DeclaringType ^ Summary ^ ==== Public Events ==== ^ Name ^ Event Arguments ^ DeclaringType ^ Summary ^ ===== Public Constructors ===== ==== GradientStyle(String, Double, GeoSolidBrush, Double, GeoSolidBrush) ==== This constructor creates a new instance by passing the ColumnName (which it will get the data from) as well as the lowerValue and its corresponding SolidBrush, and the upperValue and its corresponding SolidBrush. === Remarks === In this constructor, the NoDataValue defaults to -9999 and the NoDataBrush color is transparent. === Parameters === ^ Name ^ Type ^ Description ^ | columnName | String | | | lowerValue | Double | | | lowerGeoSolidBrush | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | | upperValue | Double | | | upperGeoSolidBrush | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | [[#Public Constructors|Go Back]] ==== GradientStyle(String, Double, GeoSolidBrush, Double, GeoSolidBrush, Double, GeoSolidBrush) ==== This constructor creates a new instance by passing the ColumnName (which it will get the data from) as well as the lowerValue and its corresponding SolidBrush, the upperValue and its corresponding SolidBrush, and the NoDataValue and its corresponding SolidBrush. === Parameters === ^ Name ^ Type ^ Description ^ | columnName | String | | | lowerValue | Double | | | lowerGeoSolidBrush | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | | upperValue | Double | | | upperGeoSolidBrush | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | | noDataValue | Double | | | noDataSolidBrush | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | | [[#Public Constructors|Go Back]] ===== Protected Constructors ===== ===== Public Methods ===== ==== Draw(IEnumerable, GeoCanvas, Collection, Collection) ==== This method draws the shapes on the canvas you provided. === Remarks === This method is the concrete wrapper for the abstract method DrawCore. In this method, we take the shapes you passed in and draw them on the canvas you provided. Each style (based on its properties) may draw each shape differently. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework. === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | shapes | IEnumerable<[[ThinkGeo.MapSuite.WindowsPhoneCore.BaseShape|BaseShape]]> | This parameter represents the shapes you want to draw on the canvas. | | canvas | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]] | This parameter represents the canvas you want to draw the shapes on. | | labelsInThisLayer | Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | The labels will be drawn in the current layer only. | | labelsInAllLayers | Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | The labels will be drawn in all layers. | [[#Public Methods|Go Back]] ==== Draw(IEnumerable, GeoCanvas, Collection, Collection) ==== This method draws the features on the canvas you provided. === Remarks === This method is the concrete wrapper for the abstract method DrawCore. In this method, we take the features you passed in and draw them on the canvas you provided. Each style (based on its properties) may draw each feature differently. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework. === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | features | IEnumerable<[[ThinkGeo.MapSuite.WindowsPhoneCore.Feature|Feature]]> | This parameter represents the features you want to draw on the canvas. | | canvas | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]] | This parameter represents the canvas you want to draw the features on. | | labelsInThisLayer | Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | The labels will be drawn in the current layer only. | | labelsInAllLayers | Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | The labels will be drawn in all layers. | [[#Public Methods|Go Back]] ==== DrawSample(GeoCanvas, DrawingRectangleF) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | canvas | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]] | | | drawingExtent | [[ThinkGeo.MapSuite.WindowsPhoneCore.DrawingRectangleF|DrawingRectangleF]] | | [[#Public Methods|Go Back]] ==== Equals(Object) ==== === Return Value === ^ Return Type ^ Description ^ | Boolean | | === Parameters === ^ Name ^ Type ^ Description ^ | obj | Object | | [[#Public Methods|Go Back]] ==== GetHashCode() ==== === Return Value === ^ Return Type ^ Description ^ | Int32 | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== GetRequiredColumnNames() ==== This method returns the column data for each feature that is required for the style to properly draw. === Remarks === This method is the concrete wrapper for the abstract method GetRequiredColumnNamesCore. 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. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework. === Return Value === ^ Return Type ^ Description ^ | Collection | This method returns a collection of column names that the style needs. | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== GetType() ==== === Return Value === ^ Return Type ^ Description ^ | Type | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ==== ToString() ==== === Return Value === ^ Return Type ^ Description ^ | String | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Public Methods|Go Back]] ===== Protected Methods ===== ==== DrawCore(IEnumerable, GeoCanvas, Collection, Collection) ==== This method draws the features on the canvas you provided. === Remarks === This virtual method is called from the concrete public method Draw. In this method, we take the features you passed in and draw them on the canvas you provided. Each style (based on its properties) may draw each feature differently. When implementing this virtual 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. === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | features | IEnumerable<[[ThinkGeo.MapSuite.WindowsPhoneCore.Feature|Feature]]> | This parameter represents the features you want to draw on the canvas. | | canvas | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]] | This parameter represents the canvas you want to draw the features on. | | labelsInThisLayer | Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | The labels will be drawn in the current layer only. | | labelsInAllLayers | Collection<[[ThinkGeo.MapSuite.WindowsPhoneCore.SimpleCandidate|SimpleCandidate]]> | The labels will be drawn in all layers. | [[#Protected Methods|Go Back]] ==== DrawSampleCore(GeoCanvas, DrawingRectangleF) ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ | canvas | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoCanvas|GeoCanvas]] | | | drawingExtent | [[ThinkGeo.MapSuite.WindowsPhoneCore.DrawingRectangleF|DrawingRectangleF]] | | [[#Protected Methods|Go Back]] ==== Finalize() ==== === Return Value === ^ Return Type ^ Description ^ | Void | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Protected Methods|Go Back]] ==== GetRequiredColumnNamesCore() ==== This method returns the column data for each feature that is required for the style to properly draw. === 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. === Return Value === ^ Return Type ^ Description ^ | Collection | This method returns a collection of column names that the style needs. | === Parameters === ^ Name ^ Type ^ Description ^ [[#Protected Methods|Go Back]] ==== MemberwiseClone() ==== === Return Value === ^ Return Type ^ Description ^ | Object | | === Parameters === ^ Name ^ Type ^ Description ^ [[#Protected Methods|Go Back]] ===== Public Properties ===== ==== ColumnName ==== This property gets and sets the column name used in the style. === Remarks === None. === Return Value === ^ Return Type ^ | String | [[#Public Properties|Go Back]] ==== IsActive ==== This property gets and sets the active status of the style. === Remarks === If the style is not active then it will not draw. === Return Value === ^ Return Type ^ | Boolean | [[#Public Properties|Go Back]] ==== LowerGeoSolidBrush ==== This property gets and sets the solid brush that is used for the style's lower value. === Remarks === None. === Return Value === ^ Return Type ^ | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | [[#Public Properties|Go Back]] ==== LowerValue ==== This property gets and sets the lower value used in the style. === Remarks === None. === Return Value === ^ Return Type ^ | Double | [[#Public Properties|Go Back]] ==== Name ==== This property gets and set 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. === Return Value === ^ Return Type ^ | String | [[#Public Properties|Go Back]] ==== NoDataSolidBrush ==== This property gets and sets the solid brush that is used for the style's NoDataValue. === Remarks === None. === Return Value === ^ Return Type ^ | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | [[#Public Properties|Go Back]] ==== NoDataValue ==== This property gets and sets the no data value used in the style. === Remarks === None. === Return Value === ^ Return Type ^ | Double | [[#Public Properties|Go Back]] ==== RequiredColumnNames ==== 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. === Return Value === ^ Return Type ^ | Collection | [[#Public Properties|Go Back]] ==== UpperGeoSolidBrush ==== This property gets and sets the solid brush that is used for the style's upper value. === Remarks === None. === Return Value === ^ Return Type ^ | [[ThinkGeo.MapSuite.WindowsPhoneCore.GeoSolidBrush|GeoSolidBrush]] | [[#Public Properties|Go Back]] ==== UpperValue ==== This property gets and sets the upper value used in the style. === Remarks === None. === Return Value === ^ Return Type ^ | Double | [[#Public Properties|Go Back]] ===== Protected Properties ===== ===== Public Events ===== __NOTOC__ [[Category:WindowsPhoneMapSuiteCore]] [[Category:ThinkGeo.MapSuite.WindowsPhoneCore]] [[Category:UpdateDocumentation]]