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:
- In Expression Blend, select File | New Project.
- 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.
- 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.
- Add a reference to the C1.WPF.Maps or C1.Silverlight.Maps assembly by completing the following steps:
- Select Project | Add Reference.
- 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.
|
- Select C1.WPF.dll and click Open. A reference is added to your project.
- Add the C1Maps control to your project by completing the following steps:
- On the menu, select Window | Assets to open the Assets tab.
- Under the Assets tab, enter "C1Maps" into the search bar.
- The C1Maps control's icon appears.
- Double-click the C1Maps icon to add the control to your project.
- 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