GeoBlazor Pro
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Components.Widgets
SwipeWidget Class
The Swipe widget provides a tool to show a portion of a layer or layers
on top of a map.
ArcGIS Maps SDK for JavaScript
public class SwipeWidget : dymaptic.GeoBlazor.Pro.Components.Widgets.ProWidget
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 dymaptic.GeoBlazor.Core.Components.Widgets.Widget 🡒 ProWidget 🡒 SwipeWidget
Constructors
SwipeWidget() Constructor
Parameterless constructor for use as a Razor Component.
public SwipeWidget();
SwipeWidget(SwipeDirection, IReadOnlyList, IReadOnlyList, string, Nullable, string, string, string, MapView, Nullable, Nullable, SwipeViewModel, Nullable, SwipeVisibleElements, string) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public SwipeWidget(dymaptic.GeoBlazor.Pro.Enums.SwipeDirection direction, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>? leadingLayers=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>? trailingLayers=null, string? containerId=null, System.Nullable<bool> disabled=null, string? dragLabel=null, string? icon=null, string? label=null, dymaptic.GeoBlazor.Core.Components.Views.MapView? mapView=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> position=null, System.Nullable<double> swipePosition=null, dymaptic.GeoBlazor.Pro.Components.SwipeViewModel? viewModel=null, System.Nullable<bool> visible=null, dymaptic.GeoBlazor.Pro.Components.SwipeVisibleElements? visibleElements=null, string? widgetId=null);
Parameters
direction
SwipeDirection
The direction the Swipe widget moves across the view.
default “horizontal”
ArcGIS Maps SDK for JavaScript
leadingLayers
System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>
A collection of Layers that will show on the left or top side of the Swipe widget.
ArcGIS Maps SDK for JavaScript
trailingLayers
System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>
A collection of Layers that will show on the right or bottom side of the Swipe widget.
ArcGIS Maps SDK for JavaScript
containerId
System.String
The id of an external HTML Element (div). If provided, the widget will be placed inside that element, instead of on the map.
disabled
System.Nullable<System.Boolean>
When true
, sets the widget to a disabled state so the user cannot interact with it.
default false
ArcGIS Maps SDK for JavaScript
dragLabel
System.String
The text that shows in a tooltip when hovering over the handle of
the Swipe widget.
ArcGIS Maps SDK for JavaScript
icon
System.String
Icon which represents the widget.
default “compare”
ArcGIS Maps SDK for JavaScript
label
System.String
The widget’s default label.
ArcGIS Maps SDK for JavaScript
mapView
dymaptic.GeoBlazor.Core.Components.Views.MapView
If the Widget is defined outside of the MapView, this link is required to connect them together.
position
System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition>
The position of the widget in relation to the map view.
swipePosition
System.Nullable<System.Double>
The position of the Swipe widget.
default 25
ArcGIS Maps SDK for JavaScript
viewModel
SwipeViewModel
The view model for this widget.
ArcGIS Maps SDK for JavaScript
visible
System.Nullable<System.Boolean>
Indicates whether the widget is visible.
default true
ArcGIS Maps SDK for JavaScript
visibleElements
SwipeVisibleElements
The visible elements that are displayed within the widget.
ArcGIS Maps SDK for JavaScript
widgetId
System.String
The unique ID assigned to the widget when the widget is created.
ArcGIS Maps SDK for JavaScript
Properties
SwipeWidget.Direction Property
The direction the Swipe widget moves across the view. If “horizontal”, the widget will move left and right and if “vertical”, the widget will move up and down.
public dymaptic.GeoBlazor.Pro.Enums.SwipeDirection Direction { get; set; }
Property Value
SwipeWidget.Disabled Property
When true, sets the widget to a disabled state so the user cannot interact with it.
public System.Nullable<bool> Disabled { get; set; }
Property Value
System.Nullable<System.Boolean>
SwipeWidget.DragLabel Property
When true, sets the widget to a disabled state so the user cannot interact with it.
public string? DragLabel { get; set; }
Property Value
SwipeWidget.LeadingLayers Property
A collection of Layers that will show on the left or top side of the Swipe widget.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer> LeadingLayers { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>
SwipeWidget.SwipePosition Property
The position of the Swipe widget.
default 25
ArcGIS Maps SDK for JavaScript
public System.Nullable<double> SwipePosition { get; set; }
Property Value
System.Nullable<System.Double>
SwipeWidget.TrailingLayers Property
A collection of Layers that will show on the right or bottom side of the Swipe widget.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer> TrailingLayers { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>
SwipeWidget.Type Property
The type of widget
public override dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }
Property Value
dymaptic.GeoBlazor.Core.Enums.WidgetType
SwipeWidget.ViewModel Property
The view model for this widget.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Pro.Components.SwipeViewModel? ViewModel { get; set; }
Property Value
SwipeWidget.VisibleElements Property
The visible elements that are displayed within the widget.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Pro.Components.SwipeVisibleElements? VisibleElements { get; set; }
Property Value
Methods
SwipeWidget.AddToLeadingLayers(Layer[]) Method
Asynchronously adds elements to the LeadingLayers property.
public System.Threading.Tasks.Task AddToLeadingLayers(params dymaptic.GeoBlazor.Core.Components.Layers.Layer[] values);
Parameters
values
dymaptic.GeoBlazor.Core.Components.Layers.Layer[]
The elements to add.
Returns
SwipeWidget.AddToTrailingLayers(Layer[]) Method
Asynchronously adds elements to the TrailingLayers property.
public System.Threading.Tasks.Task AddToTrailingLayers(params dymaptic.GeoBlazor.Core.Components.Layers.Layer[] values);
Parameters
values
dymaptic.GeoBlazor.Core.Components.Layers.Layer[]
The elements to add.
Returns
SwipeWidget.GetDirection() Method
Asynchronously retrieve the current value of the Direction property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Pro.Enums.SwipeDirection>> GetDirection();
Returns
System.Threading.Tasks.Task<System.Nullable<SwipeDirection>>
SwipeWidget.GetDisabled() Method
Asynchronously retrieve the current value of the Disabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetDisabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
SwipeWidget.GetDragLabel() Method
Asynchronously retrieve the current value of the DragLabel property.
public System.Threading.Tasks.Task<string?> GetDragLabel();
Returns
System.Threading.Tasks.Task<System.String>
SwipeWidget.GetLeadingLayers() Method
Asynchronously retrieve the current value of the LeadingLayers property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>?> GetLeadingLayers();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>>
SwipeWidget.GetSwipePosition() Method
Asynchronously retrieve the current value of the SwipePosition property.
public System.Threading.Tasks.Task<System.Nullable<double>> GetSwipePosition();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Double>>
SwipeWidget.GetTrailingLayers() Method
Asynchronously retrieve the current value of the TrailingLayers property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>?> GetTrailingLayers();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>>
SwipeWidget.GetViewModel() Method
Asynchronously retrieve the current value of the ViewModel property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.SwipeViewModel?> GetViewModel();
Returns
System.Threading.Tasks.Task<SwipeViewModel>
SwipeWidget.GetVisibleElements() Method
Asynchronously retrieve the current value of the VisibleElements property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.SwipeVisibleElements?> GetVisibleElements();
Returns
System.Threading.Tasks.Task<SwipeVisibleElements>
SwipeWidget.RemoveFromLeadingLayers(Layer[]) Method
Asynchronously remove an element from the LeadingLayers property.
public System.Threading.Tasks.Task RemoveFromLeadingLayers(params dymaptic.GeoBlazor.Core.Components.Layers.Layer[] values);
Parameters
values
dymaptic.GeoBlazor.Core.Components.Layers.Layer[]
The elements to remove.
Returns
SwipeWidget.RemoveFromTrailingLayers(Layer[]) Method
Asynchronously remove an element from the TrailingLayers property.
public System.Threading.Tasks.Task RemoveFromTrailingLayers(params dymaptic.GeoBlazor.Core.Components.Layers.Layer[] values);
Parameters
values
dymaptic.GeoBlazor.Core.Components.Layers.Layer[]
The elements to remove.
Returns
SwipeWidget.SetDirection(SwipeDirection) Method
Asynchronously set the value of the Direction property after render.
public System.Threading.Tasks.Task SetDirection(dymaptic.GeoBlazor.Pro.Enums.SwipeDirection value);
Parameters
value
SwipeDirection
The value to set.
Returns
SwipeWidget.SetDisabled(Nullable) Method
Asynchronously set the value of the Disabled property after render.
public System.Threading.Tasks.Task SetDisabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
SwipeWidget.SetDragLabel(string) Method
Asynchronously set the value of the DragLabel property after render.
public System.Threading.Tasks.Task SetDragLabel(string? value);
Parameters
value
System.String
The value to set.
Returns
SwipeWidget.SetLeadingLayers(IReadOnlyList) Method
Asynchronously set the value of the LeadingLayers property after render.
public System.Threading.Tasks.Task SetLeadingLayers(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer> value);
Parameters
value
System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>
The value to set.
Returns
SwipeWidget.SetSwipePosition(Nullable) Method
Asynchronously set the value of the SwipePosition property after render.
public System.Threading.Tasks.Task SetSwipePosition(System.Nullable<double> value);
Parameters
value
System.Nullable<System.Double>
The value to set.
Returns
SwipeWidget.SetTrailingLayers(IReadOnlyList) Method
Asynchronously set the value of the TrailingLayers property after render.
public System.Threading.Tasks.Task SetTrailingLayers(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer> value);
Parameters
value
System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.Layers.Layer>
The value to set.
Returns
SwipeWidget.SetViewModel(SwipeViewModel) Method
Asynchronously set the value of the ViewModel property after render.
public System.Threading.Tasks.Task SetViewModel(dymaptic.GeoBlazor.Pro.Components.SwipeViewModel? value);
Parameters
value
SwipeViewModel
The value to set.
Returns
SwipeWidget.SetVisibleElements(SwipeVisibleElements) Method
Asynchronously set the value of the VisibleElements property after render.
public System.Threading.Tasks.Task SetVisibleElements(dymaptic.GeoBlazor.Pro.Components.SwipeVisibleElements? value);
Parameters
value
SwipeVisibleElements
The value to set.
Returns
SwipeWidget.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()