dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components

SliderViewModel Class

Provides the logic for the Slider widget.
ArcGIS Maps SDK for JavaScript

public class SliderViewModel : dymaptic.GeoBlazor.Core.Components.MapComponent

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 SliderViewModel

Constructors

SliderViewModel() Constructor

Parameterless constructor for use as a Razor Component.

public SliderViewModel();

SliderViewModel(Nullable, Nullable, SliderLabelFormatter, InputParser, SliderLabelFormatter, Nullable, Nullable, Nullable, Nullable, IReadOnlyList) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public SliderViewModel(System.Nullable<double> effectiveMax=null, System.Nullable<double> effectiveMin=null, dymaptic.GeoBlazor.Core.Functions.SliderLabelFormatter? inputFormatFunction=null, dymaptic.GeoBlazor.Core.Functions.InputParser? inputParseFunction=null, dymaptic.GeoBlazor.Core.Functions.SliderLabelFormatter? labelFormatFunction=null, System.Nullable<double> max=null, System.Nullable<double> min=null, System.Nullable<double> precision=null, System.Nullable<bool> thumbsConstrained=null, System.Collections.Generic.IReadOnlyList<double>? values=null);

Parameters

effectiveMax System.Nullable<System.Double>

When set, the user is restricted from moving slider thumbs to positions higher than
this value.
ArcGIS Maps SDK for JavaScript

effectiveMin System.Nullable<System.Double>

When set, the user is restricted from moving slider thumbs to positions less than
this value.
ArcGIS Maps SDK for JavaScript

inputFormatFunction SliderLabelFormatter

A function used to format user inputs.
ArcGIS Maps SDK for JavaScript

inputParseFunction InputParser

Function used to parse slider inputs formatted by the inputFormatFunction.
ArcGIS Maps SDK for JavaScript

labelFormatFunction SliderLabelFormatter

A function used to format labels.
ArcGIS Maps SDK for JavaScript

max System.Nullable<System.Double>

The maximum possible data/thumb value of the slider.
ArcGIS Maps SDK for JavaScript

min System.Nullable<System.Double>

The minimum possible data/thumb value of the slider.
ArcGIS Maps SDK for JavaScript

precision System.Nullable<System.Double>

Defines how slider values should be rounded.
default 4
ArcGIS Maps SDK for JavaScript

thumbsConstrained System.Nullable<System.Boolean>

When false, the user can freely move any slider thumb to any
position along the track.
default true
ArcGIS Maps SDK for JavaScript

values System.Collections.Generic.IReadOnlyList<System.Double>

An array of numbers representing absolute thumb positions on the slider.
ArcGIS Maps SDK for JavaScript

Properties

SliderViewModel.EffectiveMax Property

When set, the user is restricted from moving slider thumbs to positions higher than
this value.
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> EffectiveMax { get; set; }

Property Value

System.Nullable<System.Double>

SliderViewModel.EffectiveMin Property

When set, the user is restricted from moving slider thumbs to positions less than
this value.
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> EffectiveMin { get; set; }

Property Value

System.Nullable<System.Double>

SliderViewModel.HasInputFormatFunction Property

A convenience property that signifies whether a custom InputFormatFunction function was registered.

public bool HasInputFormatFunction { get; }

Property Value

System.Boolean

SliderViewModel.HasInputParseFunction Property

A convenience property that signifies whether a custom InputParseFunction function was registered.

public bool HasInputParseFunction { get; }

Property Value

System.Boolean

SliderViewModel.HasLabelFormatFunction Property

A convenience property that signifies whether a custom LabelFormatFunction function was registered.

public bool HasLabelFormatFunction { get; }

Property Value

System.Boolean

SliderViewModel.InputFormatFunction Property

A function used to format user inputs.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Functions.SliderLabelFormatter? InputFormatFunction { get; set; }

Property Value

SliderLabelFormatter

SliderViewModel.InputParseFunction Property

Function used to parse slider inputs formatted by the inputFormatFunction.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Functions.InputParser? InputParseFunction { get; set; }

Property Value

InputParser

SliderViewModel.LabelFormatFunction Property

A function used to format labels.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Functions.SliderLabelFormatter? LabelFormatFunction { get; set; }

Property Value

SliderLabelFormatter

SliderViewModel.Labels Property

An array of strings associated with values generated using an internal label formatter or
the values returned from labelFormatFunction.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Model.LabelInfos? Labels { get; set; }

Property Value

LabelInfos

SliderViewModel.Max Property

The maximum possible data/thumb value of the slider.
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> Max { get; set; }

Property Value

System.Nullable<System.Double>

SliderViewModel.Min Property

The minimum possible data/thumb value of the slider.
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> Min { get; set; }

Property Value

System.Nullable<System.Double>

SliderViewModel.Precision Property

Defines how slider values should be rounded.
default 4
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> Precision { get; set; }

Property Value

System.Nullable<System.Double>

SliderViewModel.State Property

The state of the view model.
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.ViewModelState> State { get; set; }

Property Value

System.Nullable<ViewModelState>

SliderViewModel.ThumbsConstrained Property

When false, the user can freely move any slider thumb to any
position along the track.
default true
ArcGIS Maps SDK for JavaScript

public System.Nullable<bool> ThumbsConstrained { get; set; }

Property Value

System.Nullable<System.Boolean>

SliderViewModel.Values Property

An array of numbers representing absolute thumb positions on the slider.
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.IReadOnlyList<double>? Values { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<System.Double>

Methods

SliderViewModel.AddToValues(double[]) Method

Asynchronously adds elements to the Values property.

public System.Threading.Tasks.Task AddToValues(params double[] values);

Parameters

values System.Double[]

The elements to add.

Returns

System.Threading.Tasks.Task

SliderViewModel.DefaultInputFormatFunction(double) Method

The default input format function available for use as a fallback in custom formatting implementations.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<string?> DefaultInputFormatFunction(double value);

Parameters

value System.Double

The input value to format.

Returns

System.Threading.Tasks.Task<System.String>

SliderViewModel.DefaultInputParseFunction(string) Method

The default input parsing function available for use as a fallback in custom parsing implementations.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<System.Nullable<double>> DefaultInputParseFunction(string value);

Parameters

value System.String

The thumb value to parse.

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

SliderViewModel.DefaultLabelFormatFunction(double) Method

The default label format function, available for use as a fallback in custom formatting implementations.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<string?> DefaultLabelFormatFunction(double value);

Parameters

value System.Double

The thumb value to format.

Returns

System.Threading.Tasks.Task<System.String>

SliderViewModel.GetBounds() Method

Returns the effective bounds of the slider.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Model.Bounds?> GetBounds();

Returns

System.Threading.Tasks.Task<Bounds>

SliderViewModel.GetBoundsForValueAtIndex(int) Method

Returns the min and max bounds for a ‘value’ at the provided index.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<string?> GetBoundsForValueAtIndex(int index);

Parameters

index System.Int32

The index of the associated value.

Returns

System.Threading.Tasks.Task<System.String>

SliderViewModel.GetEffectiveMax() Method

Asynchronously retrieve the current value of the EffectiveMax property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetEffectiveMax();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

SliderViewModel.GetEffectiveMin() Method

Asynchronously retrieve the current value of the EffectiveMin property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetEffectiveMin();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

SliderViewModel.GetLabelForValue(double, SliderViewModelType, int) Method

Returns the formatted label for a provided value.
param type The label type.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<string?> GetLabelForValue(double value, dymaptic.GeoBlazor.Core.Enums.SliderViewModelType type, int index);

Parameters

value System.Double

The value from which to retrieve a formatted label.

type SliderViewModelType

The label type.

index System.Int32

The index of the label.

Returns

System.Threading.Tasks.Task<System.String>

SliderViewModel.GetLabels() Method

Asynchronously retrieve the current value of the Labels property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Model.LabelInfos?> GetLabels();

Returns

System.Threading.Tasks.Task<LabelInfos>

SliderViewModel.GetMax() Method

Asynchronously retrieve the current value of the Max property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetMax();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

SliderViewModel.GetMin() Method

Asynchronously retrieve the current value of the Min property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetMin();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

SliderViewModel.GetPrecision() Method

Asynchronously retrieve the current value of the Precision property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetPrecision();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

SliderViewModel.GetState() Method

Asynchronously retrieve the current value of the State property.

public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.ViewModelState>> GetState();

Returns

System.Threading.Tasks.Task<System.Nullable<ViewModelState>>

SliderViewModel.GetThumbsConstrained() Method

Asynchronously retrieve the current value of the ThumbsConstrained property.

public System.Threading.Tasks.Task<System.Nullable<bool>> GetThumbsConstrained();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Boolean>>

SliderViewModel.GetValues() Method

Asynchronously retrieve the current value of the Values property.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<double>?> GetValues();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Double>>

SliderViewModel.RemoveFromValues(double[]) Method

Asynchronously remove an element from the Values property.

public System.Threading.Tasks.Task RemoveFromValues(params double[] values);

Parameters

values System.Double[]

The elements to remove.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetEffectiveMax(Nullable) Method

Asynchronously set the value of the EffectiveMax property after render.

public System.Threading.Tasks.Task SetEffectiveMax(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetEffectiveMin(Nullable) Method

Asynchronously set the value of the EffectiveMin property after render.

public System.Threading.Tasks.Task SetEffectiveMin(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetMax(Nullable) Method

Asynchronously set the value of the Max property after render.

public System.Threading.Tasks.Task SetMax(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetMin(Nullable) Method

Asynchronously set the value of the Min property after render.

public System.Threading.Tasks.Task SetMin(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetPrecision(Nullable) Method

Asynchronously set the value of the Precision property after render.

public System.Threading.Tasks.Task SetPrecision(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetThumbsConstrained(Nullable) Method

Asynchronously set the value of the ThumbsConstrained property after render.

public System.Threading.Tasks.Task SetThumbsConstrained(System.Nullable<bool> value);

Parameters

value System.Nullable<System.Boolean>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetValue(int, double) Method

Updates a thumb value based on the provided index.
param value The new value to replace with the old value.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task SetValue(int index, double value);

Parameters

index System.Int32

The index of the thumb value in the associated values array.

value System.Double

The new value to replace with the old value.

Returns

System.Threading.Tasks.Task

SliderViewModel.SetValues(IReadOnlyList) Method

Asynchronously set the value of the Values property after render.

public System.Threading.Tasks.Task SetValues(System.Collections.Generic.IReadOnlyList<double>? value);

Parameters

value System.Collections.Generic.IReadOnlyList<System.Double>

The value to set.

Returns

System.Threading.Tasks.Task

SliderViewModel.ToPrecision(double) Method

Rounds the given value to the number of decimal places specified in the precision property set on the view model.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task<System.Nullable<double>> ToPrecision(double value);

Parameters

value System.Double

The thumb value to format.

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>