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

279
2
04-07-2017 02:14 AM
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.

Reply
0 Kudos
2 Replies
Occasional Contributor II
New Contributor

Thank you!

Reply
0 Kudos