Class ZoomInOutWidget
Widget which shows two buttons (horizontal or vertical) with a "+" and a "-" sign. With this, the user could zoom the map in and out.
Usage To show a ZoomInOutWidget, add a instance of the ZoomInOutWidget to Map.Widgets by
map.Widgets.Add(new ZoomInOutWidget(map));
Customize Size: Height and Width of the buttons Orientation: Orientation of the buttons. Could be Horizontal or Vertical. Vertical is default. StrokeColor: Color of button frames TextColor: Color of "+" and "-" signs BackColor: Color of button background Opacity: Opacity of buttons ZoomFactor: Factor for changing Resolution. Default is 2;
Inherited Members
Namespace: Mapsui.Widgets.Zoom
Assembly: Mapsui.dll
Syntax
public class ZoomInOutWidget : Widget, IWidget, INotifyPropertyChanged
Properties
| Improve this Doc View SourceBackColor
Color of background
Declaration
public Color BackColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Opacity
Opacity of background, frame and signs
Declaration
public float Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Orientation
Orientation of buttons
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation |
Size
Width and height of buttons
Declaration
public float Size { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
StrokeColor
Color of button frames
Declaration
public Color StrokeColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
TextColor
Color of "+" and "-" sign
Declaration
public Color TextColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
| Improve this Doc View SourceHandleWidgetTouched(INavigator, Point)
Declaration
public override bool HandleWidgetTouched(INavigator navigator, Point position)
Parameters
Type | Name | Description |
---|---|---|
INavigator | navigator | |
Point | position |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Events
| Improve this Doc View SourcePropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |
WidgetTouched
Event handler which is called, when buttons are touched. If there isn't one, than the default handler is used, which change the Resolution of Viewport.
Declaration
public event EventHandler<WidgetTouchedEventArgs> WidgetTouched
Event Type
Type | Description |
---|---|
System.EventHandler<WidgetTouchedEventArgs> |