ComponentOne Maps for WPF and Silverlight
Maps for WPF and Silverlight 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 in Expression Blend to create a WPF or Silverlight application using the C1Maps control. You will also set the control's properties.

    Complete the following steps:

    1. In Expression Blend, select File | New Project.
    2. In the New Project dialog box, select the Silverlight project type in the left pane and, in the right-pane, select WPF Application + Website or Silverlight Application + Website.
    3. Enter a Name and Location for your project, select a Language in the drop-down box, and click OK. Blend creates a new application, which opens with the MainPage.xaml file displayed in Design view.
    4. Add a reference to the C1.WPF.Maps or C1.Silverlight.Maps assembly by completing the following steps:
      1. Select Project | Add Reference.
      2. Browse to find the C1.WPF.Maps.dll or C1.Silverlight.Maps.5.dll assembly installed with Maps for WPF.           

        Note: The *.dll files are installed to C:\Program Files\ComponentOne\WPF Edition and C:\Program Files\ComponentOne\Silverlight Edition by default.

      3. Select C1.WPF.dll and click Open. A reference is added to your project.
    5. Add the C1Maps control to your project by completing the following steps:
      1. On the menu, select Window | Assets to open the Assets tab.
      2. Under the Assets tab, enter "C1Maps" into the search bar.
      3. The C1Maps control's icon appears.
      4. Double-click the C1Maps icon to add the control to your project.
    6. In the Objects and Timeline panel, select [C1Maps] and then, under the Properties panel, set the following properties:
      • Set the Name property to "C1Maps1" so that your control will have a unique identifier to call in code.
      • Set the Width property to "405".
      • Set the Height property to "472".
      • Set the C1Maps.Zoom property to "2" to set the zoom factor to 2x the original zoom.
      • Set the C1Maps.Center property to "-65, -25" so that only South America appears on the map. 

    In this step, you created a Blend project and added a C1Maps control to it; in addition, you set the properties of the C1Maps control.

    See Also