Search Results for

    Show / Hide Table of Contents

    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;

    Inheritance
    object
    Widget
    ZoomInOutWidget
    Implements
    IWidget
    IWidgetTouchable
    INotifyPropertyChanged
    Inherited Members
    Widget.HorizontalAlignment
    Widget.VerticalAlignment
    Widget.MarginX
    Widget.MarginY
    Widget.Envelope
    Widget.Enabled
    Widget.CalculatePositionX(float, float, float)
    Widget.CalculatePositionY(float, float, float)
    Widget.Touchable
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Widgets.Zoom
    Assembly: Mapsui.dll
    Syntax
    public class ZoomInOutWidget : Widget, IWidget, IWidgetTouchable, INotifyPropertyChanged

    Properties

    | Edit this page View Source

    BackColor

    Color of background

    Declaration
    public Color BackColor { get; set; }
    Property Value
    Type Description
    Color
    | Edit this page View Source

    Opacity

    Opacity of background, frame and signs

    Declaration
    public float Opacity { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Orientation

    Orientation of buttons

    Declaration
    public Orientation Orientation { get; set; }
    Property Value
    Type Description
    Orientation
    | Edit this page View Source

    Size

    Width and height of buttons

    Declaration
    public float Size { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    StrokeColor

    Color of button frames

    Declaration
    public Color StrokeColor { get; set; }
    Property Value
    Type Description
    Color
    | Edit this page View Source

    TextColor

    Color of "+" and "-" sign

    Declaration
    public Color TextColor { get; set; }
    Property Value
    Type Description
    Color

    Methods

    | Edit this page View Source

    HandleWidgetTouched(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
    Widget.HandleWidgetTouched(Navigator, MPoint)

    Events

    | Edit this page View Source

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler? PropertyChanged
    Event Type
    Type Description
    PropertyChangedEventHandler
    | Edit this page View Source

    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
    EventHandler<WidgetTouchedEventArgs>

    Implements

    IWidget
    IWidgetTouchable
    INotifyPropertyChanged
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX