How do I access a PortalItem property in the Map class?

479
2
04-07-2017 02:14 AM
JonasGabrielson
New Contributor

Hi! I'm trying out the .Net SDK for a school project, and I'm running through the WPF guide. However, I'm running into a problem. On page 20 in the current guide, you are supposed to save a portal with this code:

private async void SaveMapButton_Click(object sender, RoutedEventArgs e)
{ 
   // Get the current map Map myMap = MyMapView.Map; 
   try
   {
      // See if the map has already been saved (has an associated portal item) 
      if (myMap.PortalItem == null) 
      { // This is the initial save for this map 
      } 
   } 
   catch (Exception ex) 
   { ... } finally { ... } 
}

However, this solution doesn't work because the Map class doesn't contain a property called PortalItem. What do you suppose is the error here? I'm using the latest SDK and Visual Studio 2015.

0 Kudos
2 Replies
ChadYoder1
Occasional Contributor II
JonasGabrielson
New Contributor

Thank you!

0 Kudos