Class ButtonWidget
Widget which shows a buttons
Inherited Members
Namespace: Mapsui.Widgets.ButtonWidget
Assembly: Mapsui.dll
Syntax
public class ButtonWidget : TextBox, IWidget, IWidgetTouchable, INotifyPropertyChanged
Remarks
With this, the user could add buttons with SVG icons to the map.
Usage To show a ButtonWidget, add a instance of the ButtonWidget to Map.Widgets by
map.Widgets.Add(new ButtonWidget(map, picture));
Customize Picture: SVG image to display for button Rotation: Value for rotation in degrees Opacity: Opacity of button
Properties
| Edit this page View SourceOpacity
Opacity of background, frame and signs
Declaration
public float Opacity { get; set; }
Property Value
Type | Description |
---|---|
float |
Picture
Object for prerendered image. For internal use only.
Declaration
public object? Picture { get; set; }
Property Value
Type | Description |
---|---|
object |
Rotation
Rotation of the SVG image
Declaration
public float Rotation { get; set; }
Property Value
Type | Description |
---|---|
float |
SvgImage
SVG image to show for button
Declaration
public string? SvgImage { get; set; }
Property Value
Type | Description |
---|---|
string |
Touchable
Declaration
public override bool Touchable { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
| Edit this page View SourceHandleWidgetTouched(Navigator, MPoint)
Function, which is called, when a Widget is hidden
Declaration
public override bool HandleWidgetTouched(Navigator navigator, MPoint position)
Parameters
Type | Name | Description |
---|---|---|
Navigator | navigator | Navigator of MapControl |
MPoint | position | Screen position |
Returns
Type | Description |
---|---|
bool | True, if the Widget had handled the touch event |
Overrides
Events
| Edit this page View SourcePropertyChanged
Event handler which is called, when the button is touched
Declaration
public event PropertyChangedEventHandler? PropertyChanged
Event Type
Type | Description |
---|---|
PropertyChangedEventHandler |
WidgetTouched
Event handler which is called, when the button is touched
Declaration
public event EventHandler<WidgetTouchedEventArgs>? WidgetTouched
Event Type
Type | Description |
---|---|
EventHandler<WidgetTouchedEventArgs> |