Search Results for

    Show / Hide Table of Contents

    Class ButtonWidget

    Widget which shows a buttons

    Inheritance
    object
    Widget
    TextBox
    ButtonWidget
    Implements
    IWidget
    IWidgetTouchable
    INotifyPropertyChanged
    Inherited Members
    TextBox.PaddingX
    TextBox.PaddingY
    TextBox.CornerRadius
    TextBox.Text
    TextBox.BackColor
    TextBox.TextColor
    TextBox.Width
    TextBox.Height
    Widget.HorizontalAlignment
    Widget.VerticalAlignment
    Widget.MarginX
    Widget.MarginY
    Widget.Envelope
    Widget.Enabled
    Widget.CalculatePositionX(float, float, float)
    Widget.CalculatePositionY(float, float, float)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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 Source

    Opacity

    Opacity of background, frame and signs

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

    Picture

    Object for prerendered image. For internal use only.

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

    Rotation

    Rotation of the SVG image

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

    SvgImage

    SVG image to show for button

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

    Touchable

    Declaration
    public override bool Touchable { get; }
    Property Value
    Type Description
    bool
    Overrides
    TextBox.Touchable

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

    Events

    | Edit this page View Source

    PropertyChanged

    Event handler which is called, when the button is touched

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

    WidgetTouched

    Event handler which is called, when the button is touched

    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