Examples of working with WPF API objects from program code

2492
1
11-11-2014 12:41 AM
Labels (1)
AnatoliiTerentiev
Occasional Contributor III

Dear Gurus!

Is there are some resources where I can find examples of working with WPF API objects from  program code.

For example if I have xaml:

        <esri:Map x:Name="Map" Background="White" WrapAround="true"

                                Extent="6095000,6810000,6900000,7258000" >

            <esri:ArcGISDynamicMapServiceLayer ID="BaseLayer"

                            Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer" />

            <esri:FeatureLayer   ID="routes_osm"

                            Url="http://localhost:6080/ArcGIS/rest/services/streetRK/MapServer/1">              

            </esri:FeatureLayer>

        </esri:Map>

        </esri:Map>        </esri:Map>

How I can create FeatureLayer from code and so on... May be exists some resources where I can find solutions for such tasks more quickly

0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor

Hi Anatolii,

The equivalent code-behind to your XAML is this:

codebehind.PNG

Since you also asked about FeatureLayer and MapTips (in another post), the FeatureLayer in following XAML-code

ArcGIS Runtime SDK for WPF is equivalent to the following code-behind.

featurelayer.PNG

Notice that code-behind tends to be more lengthy and less intuitive as XAML, this is why our SDK samples to be as short and readable as possible is mostly in XAML whenever possible.

0 Kudos