Use this method to test if SetViewingModeAsync can complete successfully. For a 2D view the only supported viewing mode is Map. For a 3D view SceneLocal and SceneGlobal are valid viewing modes.
publicvoid SetViewingModeToSceneLocal()
{
//Get the active map view.
var mapView = MapView.Active;
if (mapView == null)
return;
//Check if the view can be set to SceneLocal and if it can set it.
if (mapView.CanSetViewingMode(ArcGIS.Core.CIM.MapViewingMode.SceneLocal))
mapView.SetViewingModeAsync(ArcGIS.Core.CIM.MapViewingMode.SceneLocal);
}