-
Book Overview & Buying
-
Table Of Contents
Learning ArcGIS Runtime SDK for .NET
By :
Most apps have more than one layer. In real apps, there could be five layers or even 20 layers. You could even have the option for the user to have multiple basemaps. Once multiple vector (geometric) layers are added to the map, it can easily become difficult to discern which layers are which, especially in dense urban areas. Because of this, a legend is really helpful and pretty much a standard feature for non-trivial apps. Here is an example of a legend built with the iOS version of the SDK:

Legend built with the ios version
Unfortunately, ArcGIS Runtime does not come with a legend control in Esri.ArcGISRuntime.Controls. However, Esri has built a toolkit that comes with some sample legends, which we will now make use of in the next exercise:
Add a reference to
Esri.ArcGISRuntime.Toolkit.dll, which is located in C:\ArcGISRuntimeBook.
In the project we created earlier in this chapter, we will now add some XAML code to MainWindow.xaml. Add the following reference to the XAML code:
xmlns...
Change the font size
Change margin width
Change background colour