-
Book Overview & Buying
-
Table Of Contents
Learning ArcGIS Runtime SDK for .NET
By :
Being able to interact with the layers in the map is a very important capability that your users will expect. Otherwise, the map is just a pretty picture. To provide this capability in a non-MVVM app would simply require adding a click event to the code-behind file of MainWindow.cs. Another feature that your user might expect is the ability to see coordinates on the map as they move the mouse. But how do we accomplish this with MVVM in such a way that we can move our code from MainWindow.cs to another place?
Well, you already know the answer. We create a UserControl task with ViewModel and have it display the coordinates in the XAML code of UserControl. Let's implement this:
Create a new ArcGIS Runtime project. In this example, we're going to name it Chapter6. Copy the following folders: Behavior, Models, Services, and ViewModels. Install MVVM Light and Json.Net, and add a reference to System.Windows.Interactivity (4.5). When you install MVVM Light, a ViewModel directory...
Change the font size
Change margin width
Change background colour