Skip to main content

LineLayer Class

Definition

Assembly:Avalonia.Controls.Charts
Package:Avalonia.Controls.Charts

A line layer that renders connection lines between geographic points.

public class LineLayer

Inheritance: object -> AvaloniaObject -> MapLayer -> LineLayer

Constructors

NameDescription
LineLayerNo summary available.

LineLayer Constructor

public LineLayer()

Methods

NameDescription
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetLayerBoundsGets the geographic bounds (in 0-200, 0-100 viewport units) of the content in this layer. Used for auto-scaling the map to fit content.
GetPointDataGets the data item at the specified screen point.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
OnPointerExitedHandles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects).
OnPointerMovedHandles pointer moved events. Override this method to handle interactions (e.g. hover effects).
OnPointerPressedHandles pointer pressed events. Override this method to handle interactions (e.g. selection). Inherited from MapLayer.
RenderRenders this layer to the drawing context.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

GetLayerBounds Method

Gets the geographic bounds (in 0-200, 0-100 viewport units) of the content in this layer. Used for auto-scaling the map to fit content.

public Nullable<Avalonia.Rect> GetLayerBounds()

Returns

Nullable<Avalonia.Rect>

GetPointData Method

Gets the data item at the specified screen point.

public object GetPointData(Avalonia.Point point, Avalonia.Rect chartArea)

Parameters

point Avalonia.Point

The screen point to test.

chartArea Avalonia.Rect

The chart area rectangle.

Returns

object

The data item if hit; otherwise, null.

OnPointerExited Method

Handles pointer exited events. Override this method to handle interactions (e.g. clearing hover effects).

public void OnPointerExited()

OnPointerMoved Method

Handles pointer moved events. Override this method to handle interactions (e.g. hover effects).

public bool OnPointerMoved(Avalonia.Point point, Avalonia.Rect chartArea)

Parameters

point Avalonia.Point

chartArea Avalonia.Rect

Returns

bool

True if handled.

Render Method

Renders this layer to the drawing context.

public void Render(Avalonia.Media.DrawingContext context, Avalonia.Rect chartArea, double animationProgress)

Parameters

context Avalonia.Media.DrawingContext

The drawing context.

chartArea Avalonia.Rect

The chart area rectangle.

animationProgress double

Animation progress from 0 to 1.

Properties

NameDescription
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
FromLatitudePathGets or sets the property path for source latitude.
FromLongitudePathGets or sets the property path for source longitude.
IsCurvedGets or sets whether to use curved lines.
IsVisibleGets or sets whether this layer is visible. Inherited from MapLayer.
ItemInherited from AvaloniaObject.
ItemsSourceGets or sets the data source.
MaxLineThicknessGets or sets the maximum line thickness.
MinLineThicknessGets or sets the minimum line thickness.
OpacityGets or sets the opacity of this layer. Inherited from MapLayer.
ShowEndpointsGets or sets whether to show endpoint circles.
StrokeGets or sets the stroke brush.
ToLatitudePathGets or sets the property path for destination latitude.
ToLongitudePathGets or sets the property path for destination longitude.
TooltipTemplateGets or sets the data template used for tooltips. Inherited from MapLayer.
ValuePathGets or sets the property path for line value (affects thickness).

FromLatitudePath Property

Gets or sets the property path for source latitude.

public string FromLatitudePath { get; set; }

FromLongitudePath Property

Gets or sets the property path for source longitude.

public string FromLongitudePath { get; set; }

IsCurved Property

Gets or sets whether to use curved lines.

public bool IsCurved { get; set; }

ItemsSource Property

Gets or sets the data source.

public System.Collections.IEnumerable ItemsSource { get; set; }

MaxLineThickness Property

Gets or sets the maximum line thickness.

public double MaxLineThickness { get; set; }

MinLineThickness Property

Gets or sets the minimum line thickness.

public double MinLineThickness { get; set; }

ShowEndpoints Property

Gets or sets whether to show endpoint circles.

public bool ShowEndpoints { get; set; }

Stroke Property

Gets or sets the stroke brush.

public Avalonia.Media.IBrush Stroke { get; set; }

ToLatitudePath Property

Gets or sets the property path for destination latitude.

public string ToLatitudePath { get; set; }

ToLongitudePath Property

Gets or sets the property path for destination longitude.

public string ToLongitudePath { get; set; }

ValuePath Property

Gets or sets the property path for line value (affects thickness).

public string ValuePath { get; set; }

Fields

NameDescription
FromLatitudePathPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.FromLatitudePath Avalonia property.
FromLongitudePathPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.FromLongitudePath Avalonia property.
IsCurvedPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.IsCurved Avalonia property.
IsVisiblePropertyIdentifies the Avalonia.Controls.Charts.MapLayer.IsVisible Avalonia property. Inherited from MapLayer.
ItemsSourcePropertyIdentifies the Avalonia.Controls.Charts.LineLayer.ItemsSource Avalonia property.
MaxLineThicknessPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.MaxLineThickness Avalonia property.
MinLineThicknessPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.MinLineThickness Avalonia property.
OpacityPropertyIdentifies the Avalonia.Controls.Charts.MapLayer.Opacity Avalonia property. Inherited from MapLayer.
ShowEndpointsPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.ShowEndpoints Avalonia property.
StrokePropertyIdentifies the Avalonia.Controls.Charts.LineLayer.Stroke Avalonia property.
ToLatitudePathPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.ToLatitudePath Avalonia property.
ToLongitudePathPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.ToLongitudePath Avalonia property.
TooltipTemplatePropertyIdentifies the Avalonia.Controls.Charts.MapLayer.TooltipTemplate Avalonia property. Inherited from MapLayer.
ValuePathPropertyIdentifies the Avalonia.Controls.Charts.LineLayer.ValuePath Avalonia property.

FromLatitudePathProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.FromLatitudePath Avalonia property.

public Avalonia.StyledProperty<string> FromLatitudePathProperty

FromLongitudePathProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.FromLongitudePath Avalonia property.

public Avalonia.StyledProperty<string> FromLongitudePathProperty

IsCurvedProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.IsCurved Avalonia property.

public Avalonia.StyledProperty<bool> IsCurvedProperty

ItemsSourceProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.ItemsSource Avalonia property.

public Avalonia.StyledProperty<System.Collections.IEnumerable> ItemsSourceProperty

MaxLineThicknessProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.MaxLineThickness Avalonia property.

public Avalonia.StyledProperty<double> MaxLineThicknessProperty

MinLineThicknessProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.MinLineThickness Avalonia property.

public Avalonia.StyledProperty<double> MinLineThicknessProperty

ShowEndpointsProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.ShowEndpoints Avalonia property.

public Avalonia.StyledProperty<bool> ShowEndpointsProperty

StrokeProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.Stroke Avalonia property.

public Avalonia.StyledProperty<Avalonia.Media.IBrush> StrokeProperty

ToLatitudePathProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.ToLatitudePath Avalonia property.

public Avalonia.StyledProperty<string> ToLatitudePathProperty

ToLongitudePathProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.ToLongitudePath Avalonia property.

public Avalonia.StyledProperty<string> ToLongitudePathProperty

ValuePathProperty Field

Identifies the Avalonia.Controls.Charts.LineLayer.ValuePath Avalonia property.

public Avalonia.StyledProperty<string> ValuePathProperty

Events

NameDescription
InvalidatedEvent raised when the layer needs to be redrawn. Inherited from MapLayer.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.