Legend Class

Legend settings.
Public Class Legend 
Inherits UserInterfaceBase 
Implements IUserInterfaceElement, _ 
ICloneable
This language is not supported or no code example is available.
public class Legend : UserInterfaceBase
IUserInterfaceElement
ICloneable
This language is not supported or no code example is available.
Name Description
Public property AlignValuesRight If true, values are aligned right.
Public property AlignValuesVerticalMiddle If true, the values are vertically aligned to the middle of the colored rectangles.
Public property ColorTable Gets or sets the color table.
Protected property CustomViewport Tells if the UI element is drawn with a custom viewport. (inherited from UserInterfaceBase).
Public property Disposed (inherited from DisposableBase).
Public property Static FactorOfSafety15 Factor of safety color gradient (15 items).
Public property FontFamily Gets or sets the text font family.
Public property FontSize Gets or sets the text font size.
Public property FontStyle Gets or sets the text font style.
Public property FontWeight Gets or sets the text font weight.
Public property FormatString Value's numeric format. Useful to change number format and decimal places.
Public property IsSlave If true, the legend minimum and maximum values are set automatically (FEM only).
Public property ItemSize Size of each color rectangle.
Public property Lighting When false, the UI element is drawn with a flat color.
Protected property LocationAtOrigin When doing a render to Bitmap of the item, must not change the viewport origin. (inherited from UserInterfaceBase).
Public property Max Gets or sets legend maximum value.
Public property Min Gets or sets legend minimum value.
Internal protected (Protected Friend) property ParentViewport (inherited from UserInterfaceBase).
Public property Position Top left corner position.
Public property Static RedToBlue17 Standard Red to Blue color gradient (17 items).
Public property Static RedToBlue33 Standard Red to Blue color gradient (33 items).
Public property Static RedToBlue9 Standard Red to Blue color gradient (9 items).
Public property Subtitle Gets or sets the legend subtitle.
Public property TextBackgroundColor Text background color (supports semi-transparent colors).
Public property TextColor Value text color.
Public property TextFont Gets or sets the value font.
Public property Title Gets or sets the legend title.
Public property TitleColor Title text color.
Public property TitleFont Title font.
Public property TitleFontSize Gets or sets the text font size.
Public property Values Gets the legend values.
Public property Visible Visibility status.
Top
Methods
 
Name Description
Public method Static BuildGradient(int) Builds a red to blue gradient array of colors.
Public method Clone() Creates a new object that is a copy of the current instance.
Public method Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Internal protected (Protected Friend) method Draw(Environment, Viewport)
Protected method DrawForBitmap(object)
Internal protected (Protected Friend) method DrawGdi(float, float, Graphics, Environment, Viewport, Point)
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method GetBounds(Viewport) Gets the bounds rectangle in screen coordinates.
Internal protected (Protected Friend) method GetDefaultLayerName(Environment) Use this method to get the correct layer name for internal Meshes. (inherited from UserInterfaceBase).
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Protected method GetStringValue(int) Gets the string corresponding to the n-th value.
Public method GetThumbnail(Viewport, Size, Color) Gets a thumbnail bitmap of the user interface element.
Public method GetType Gets the Type of the current instance. (inherited from Object).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Internal protected (Protected Friend) method ObservableCollectionPropertyChanged(object, NotifyCollectionChangedEventArgs) For internal use only. (inherited from DisposableBase).
Protected method RaisePropertyChangedEvent(object, DependencyProperty) For internal use only. (inherited from DisposableBase).
Public method ScaleForDPI() Scales the element for high DPI settings.
Public method SetRange(double, double) Sets the range of legend values.
Public method ToString Returns a string that represents the current object. (inherited from Object).
Public method Update(IUserInterfaceElement) Updates the contents of the element with the data from another element.
Top
Events
 
Name Description
Public event Disposed
Public event PropertyChanged For internal use only. (inherited from DisposableBase).
Top

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition