Pin Pin Class

Definition

A marker on a Map.

public class Pin : Xamarin.Forms.BindableObject
type Pin = class
    inherit BindableObject
Inheritance

Remarks

A Pin must have its Label property assigned before it is added to a map. If not, a ArgumentException is thrown.


public static Page GetMapPage ()
{   
    var map = new Map (MapSpan.FromCenterAndRadius (new Position (37, -122), Distance.FromMiles (10)));

//If Label is not set, runtime exception
    var pin = new Pin () {
        Position = new Position (37, -122),
        Label = "Some Pin!"
    };
    map.Pins.Add (pin);

    var cp = new ContentPage { 
        Content = map, 
    };

    return cp;
}

          

Constructors

Pin() Pin()

Creates a new Pin object with default values.

Fields

AddressProperty AddressProperty

Identifies the Address bindable property.

LabelProperty LabelProperty

Backing store for the Label property.

PositionProperty PositionProperty

Identifies the Position bindable property.

TypeProperty TypeProperty

Identifies the Type bindable property.

Properties

Address Address

A describing the street address.

BindingContext BindingContext

Gets or sets object that contains the properties that will be targeted by the bound properties that belong to this BindableObject.

(Inherited from BindableObject)
Id Id

For internal use by the Xamarin.Forms platform.

Label Label

A user-readable associated with the Pin.

Position Position

The latitude and longitude of the Pin.

Type Type

The kind of pin.

Methods

ApplyBindings() ApplyBindings()

Apply the bindings to BindingContext.

(Inherited from BindableObject)
ClearValue(BindableProperty) ClearValue(BindableProperty)

Clears any value set by Xamarin.Forms.BindableObject.SetValue for property.

(Inherited from BindableObject)
ClearValue(BindablePropertyKey) ClearValue(BindablePropertyKey)

Clears any value set by Xamarin.Forms.BindableObject.SetValue for the property that is identified by propertyKey.

(Inherited from BindableObject)
Equals(Object) Equals(Object)

Whether obj with equivalent Type, Position, Label and Address.

GetHashCode() GetHashCode()

The hash value for the Pin

GetValue(BindableProperty) GetValue(BindableProperty)

Returns the value that is contained the BindableProperty.

(Inherited from BindableObject)
GetValues(BindableProperty, BindableProperty) GetValues(BindableProperty, BindableProperty)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
GetValues(BindableProperty, BindableProperty, BindableProperty) GetValues(BindableProperty, BindableProperty, BindableProperty)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
IsSet(BindableProperty) IsSet(BindableProperty)

Returns true if the target property exists and has been set.

(Inherited from BindableObject)
OnBindingContextChanged() OnBindingContextChanged()

Override this method to execute an action when the BindingContext changes.

(Inherited from BindableObject)
OnPropertyChanged(String) OnPropertyChanged(String)

Call this method from a child class to notify that a change happened on a property.

(Inherited from BindableObject)
OnPropertyChanging(String) OnPropertyChanging(String)

Call this method from a child class to notify that a change is going to happen on a property.

(Inherited from BindableObject)
RemoveBinding(BindableProperty) RemoveBinding(BindableProperty)

Removes a previously set binding.

(Inherited from BindableObject)
SendTap() SendTap()

For internal use by the Xamarin.Forms platform.

SetBinding(BindableProperty, BindingBase) SetBinding(BindableProperty, BindingBase)

Assigns a binding to a property.

(Inherited from BindableObject)
SetValue(BindableProperty, Object) SetValue(BindableProperty, Object)

Sets the value of the specified property.

(Inherited from BindableObject)
SetValue(BindablePropertyKey, Object) SetValue(BindablePropertyKey, Object)

Sets the value of the propertyKey.

(Inherited from BindableObject)
SetValueCore(BindableProperty, Object, SetValueFlags) SetValueCore(BindableProperty, Object, SetValueFlags)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)
UnapplyBindings() UnapplyBindings()

Unapplies all previously set bindings.

(Inherited from BindableObject)

Events

BindingContextChanged BindingContextChanged

Raised whenever the BindingContext property changes.

(Inherited from BindableObject)
Clicked Clicked

Event that is raised when the pin is clicked.

PropertyChanged PropertyChanged

Raised when a property has changed.

(Inherited from BindableObject)
PropertyChanging PropertyChanging

Raised when a property is about to change.

(Inherited from BindableObject)

Operators

Equality(Pin, Pin) Equality(Pin, Pin)

Whether left and right have equivalent Type, Position, Label and Address values.

Inequality(Pin, Pin) Inequality(Pin, Pin)

Whether left and right differ in any of their Type, Position, Label and Address values.

Explicit Interface Implementations

IDynamicResourceHandler.SetDynamicResource(BindableProperty, String) IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

For internal use by the Xamarin.Forms platform.

(Inherited from BindableObject)

Extension Methods

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String) SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

Creates and applies a binding to a property.

SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String) SetBinding<TSource>(BindableObject, BindableProperty, Expression<Func<TSource,Object>>, BindingMode, IValueConverter, String)

Creates and applies a binding from an expression.

GetGroup<TView,TItem>(TItem) GetGroup<TView,TItem>(TItem)

For internal use by platform renderers.

GetGroupHeaderContent<TView,TItem>(TItem) GetGroupHeaderContent<TView,TItem>(TItem)

For internal use by platform renderers.

GetIndex<TView,TItem>(TItem) GetIndex<TView,TItem>(TItem)

For internal use by platform renderers.

GetIsGroupHeader<TView,TItem>(TItem) GetIsGroupHeader<TView,TItem>(TItem)

For internal use by platform renderers.

SetIsGroupHeader<TView,TItem>(TItem, Boolean) SetIsGroupHeader<TView,TItem>(TItem, Boolean)

For internal use by platform renderers.

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to