Class BaseWidget
Implements
Inherited Members
Namespace: Mapsui.Widgets
Assembly: Mapsui.dll
Syntax
public abstract class BaseWidget : IWidget
Properties
| Edit this page View SourceEnabled
Is Widget visible on screen
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Envelope
Envelope of Widget
Declaration
public MRect? Envelope { get; set; }
Property Value
| Type | Description |
|---|---|
| MRect |
Height
Height of Widget
Declaration
public double Height { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
HorizontalAlignment
Horizontal alignment of Widget
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| HorizontalAlignment |
InputAreaType
Type of area to use for touch events. The default is WidgetArea. This needs to be set to 'Map' in the constructor if widget want to receive manipulation events from all over the map.
Declaration
public InputAreaType InputAreaType { get; init; }
Property Value
| Type | Description |
|---|---|
| InputAreaType |
InputTransparent
Declaration
public bool InputTransparent { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
Margin
Margin outside of the widget
Declaration
public MRect Margin { get; set; }
Property Value
| Type | Description |
|---|---|
| MRect |
Position
Position for absolute alignment
Declaration
public MPoint Position { get; set; }
Property Value
| Type | Description |
|---|---|
| MPoint |
VerticalAlignment
Vertical alignment of Widget
Declaration
public VerticalAlignment VerticalAlignment { get; set; }
Property Value
| Type | Description |
|---|---|
| VerticalAlignment |
Width
Width of Widget
Declaration
public double Width { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
WithPointerMovedEvent
This is an init only property to allow PointerMoved event initialization within an expression body method.
Declaration
public EventHandler<WidgetEventArgs>? WithPointerMovedEvent { init; }
Property Value
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
WithPointerPressedEvent
This is an init only property to allow PointerPressed event initialization within an expression body method.
Declaration
public EventHandler<WidgetEventArgs>? WithPointerPressedEvent { init; }
Property Value
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
WithPointerReleased
This is an init only property to allow PointerReleased event initialization within an expression body method.
Declaration
public EventHandler<WidgetEventArgs>? WithPointerReleased { init; }
Property Value
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
WithTappedEvent
This is an init only property to allow Tapped event initialization within an expression body method.
Declaration
public EventHandler<WidgetEventArgs>? WithTappedEvent { init; }
Property Value
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
Methods
| Edit this page View SourceOnPointerMoved(WidgetEventArgs)
Function, which handles the widget pointer moved event
Declaration
public virtual void OnPointerMoved(WidgetEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| WidgetEventArgs | e | Arguments for this widget touch |
OnPointerPressed(WidgetEventArgs)
Function, which handles the widget pointer pressed event
Declaration
public virtual void OnPointerPressed(WidgetEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| WidgetEventArgs | e | Arguments for this widget touch |
OnPointerReleased(WidgetEventArgs)
Function, which handles the widget pointer released event
Declaration
public virtual void OnPointerReleased(WidgetEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| WidgetEventArgs | e | Arguments for this widget touch |
OnTapped(WidgetEventArgs)
Function, which handles the widget tapped event
Declaration
public virtual void OnTapped(WidgetEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| WidgetEventArgs | e | Arguments for this widget touch |
UpdateEnvelope(double, double, double, double)
Declaration
public void UpdateEnvelope(double maxWidth, double maxHeight, double screenWidth, double screenHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| double | maxWidth | |
| double | maxHeight | |
| double | screenWidth | |
| double | screenHeight |
Events
| Edit this page View SourcePointerMoved
Event which is called if widget is moved.
Declaration
public event EventHandler<WidgetEventArgs>? PointerMoved
Event Type
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
PointerPressed
Event which is called if widget is pressed.
Declaration
public event EventHandler<WidgetEventArgs>? PointerPressed
Event Type
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
PointerReleased
Event which is called if widget is released.
Declaration
public event EventHandler<WidgetEventArgs>? PointerReleased
Event Type
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |
Tapped
Event which is called if widget is tapped.
Declaration
public event EventHandler<WidgetEventArgs>? Tapped
Event Type
| Type | Description |
|---|---|
| EventHandler<WidgetEventArgs> |