The requested page is not available for the requested platform. You are viewing the content for Default platform.

How to: Customize the Cylindrical Equal-Area Projection

  • 3 min to read

To customize equal-area projection, do the following.

<Page xmlns:Map="using:DevExpress.UI.Xaml.Map" 
    x:Class="MapControl_CustomProjections.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MapControl_CustomProjections"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Loaded="Page_Loaded">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Map:MapControl x:Name="mapControl">
            <Map:VectorFileLayer>
                <Map:ShapefileReader>
                    <Map:MapPackageFileSource FileName="Assets\Countries.shp"/>
                </Map:ShapefileReader>
            </Map:VectorFileLayer>
        </Map:MapControl>
        <ListView Name="listView"
                  HorizontalAlignment="Right" VerticalAlignment="Top" 
                  Header="Projection Ratio:"
                  ItemsSource="{Binding ProjectionRatios}" 
                  FontSize="26.667" Margin="20" BorderThickness="2" BorderBrush="White"
                  MinWidth="250"
                  SelectionChanged="ListView_SelectionChanged">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" TextAlignment="Left" Margin="8" />
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

    </Grid>
</Page>