ComponentOne Maps for UWP
Maps for UWP Quick Start / Step 1 of 3: Creating an Application with a C1Maps Control
In This Topic
    Step 1 of 3: Creating an Application with a C1Maps Control
    In This Topic

    In this step, you'll begin use Visual Studio to create a Universal Windows application using the C1Maps control. You will also set the control's properties.

    Complete the following steps:

    1. Select File | New | Project to open the New Project dialog box.
    1. Select Templates | Visual C# | Windows | Universal. From the templates list, select Blank App (Universal Windows).
    2. Enter a name for your application and click OK. A new, blank Universal Windows application will open.
    1. In the Solution Explorer, right-click the References file and select Add Reference from the list. Browse to locate the following assembly references:
    • C1.UWP.dll
    • C1.UWP.DX.dll
    • C1.UWP.Maps.dll
    • C1.UWP.Zip.dll
    1. Double-click the MainPage.xaml file to open it.
    2. Add the following namespace declarations to the <Page> tag at the top of the page:
    • xmlns:C1="using:C1.Xaml.Maps"
    • xmlns:Xaml="using:C1.Xaml"

    The tag should resemble the following:

    Markup
    Copy Code
    <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:C1="using:C1.Xaml.Maps"
        xmlns:local="using:MapsTest5"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:Xaml="using:C1.Xaml"
        x:Class="MapsTest5.MainPage"
        mc:Ignorable="d">
    
    1. Insert the following markup between the <Grid> </Grid> tags to add a C1Maps control:
    Markup
    Copy Code
    <C1:C1Maps x:Name="maps" Foreground="LightGreen"></C1:C1Maps>
    

     

    In this step, you created a new Universal Windows project and added a C1Maps control to it. In the next step, you'll bind your map to a data source.