MapShapeBase.Locations Property
This documentation is no longer available on MSDN, however it is available as a CHM download.
Gets or sets the locations that define the vertices of the shape.
Namespace: Microsoft.Maps.MapControl.Core
Assembly: Microsoft.Maps.MapControl (in Microsoft.Maps.MapControl.dll)
Usage
Syntax
'Declaration
<ScriptableMemberAttribute> _
<SuppressMessageAttribute("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")> _
Public Property Locations As LocationCollection
[ScriptableMemberAttribute]
[SuppressMessageAttribute("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public LocationCollection Locations { get; set; }
[ScriptableMemberAttribute]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA2227:CollectionPropertiesShouldBeReadOnly")]
public:
property LocationCollection^ Locations {
LocationCollection^ get ();
void set (LocationCollection^ value);
}
/** @property */
public LocationCollection get_Locations ()
/** @property */
public void set_Locations (LocationCollection value)
public function get Locations () : LocationCollection
public function set Locations (value : LocationCollection)
Property Value
Returns LocationCollection.
Example
<UserControl x:Class="SilverlightTest1.ShapeSnippets"
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
Width="1024" Height="768">
<Grid x:Name="LayoutRoot" Background="White">
<m:Map x:Name="TestMap" CredentialsProvider="Your Key" Mode="AerialWithLabels" Grid.Column="0" Grid.Row="0">
<m:Map.Children>
<m:MapLayer>
<m:MapLayer.Children>
<m:MapPolygon Fill="Red" Stroke="Yellow" StrokeThickness="5"
Opacity="0.7" Locations="20,-20 20,20 -20,20 -20,-20"/>
<m:MapPolyline Stroke="White" StrokeThickness="5" Opacity="0.7"
Locations="10,-10 10,10 -10,-10 -10,10"/>
</m:MapLayer.Children>
</m:MapLayer>
</m:Map.Children>
</m:Map>
</Grid>
</UserControl>
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Target Platforms
Change History
See Also
Reference
MapShapeBase Class
MapShapeBase Members
Microsoft.Maps.MapControl.Core Namespace