/// <summary> /// Displays the Map Contents panel /// </summary> private void ShowMapContents() { // Locate the SidePanelContainer and MapContentsTabItem. TabControl sidePanelContainer = MapApplication.Current.FindObjectInLayout("SidePanelContainer") as TabControl; TabItem mapContents = MapApplication.Current.FindObjectInLayout("MapContentsTabItem") as TabItem; // Verify they are not null before displaying if (sidePanelContainer != null && mapContents != null) { sidePanelContainer.SelectedItem = mapContents; // try to get storyboard (animation) for showing attribute table Storyboard showStoryboard = sidePanelContainer.FindStoryboard("SidePanelContainer" + "_Show"); if (showStoryboard != null) { showStoryboard.Begin(); // use storyboard if available } else { sidePanelContainer.Visibility = Visibility.Visible; // no storyboard, so set visibility directly } } }