ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / GridStyleItem Class / Grid Property
Example Version

Grid Property (GridStyleItem)
Gets or sets the ArcGIS.Core.CIM.CIMMapGrid of the map grid style item.
Syntax
public CIMMapGrid Grid {get; set;}
Exceptions
ExceptionDescription
This property must be called within the lambda passed to QueuedTask.Run
Example
Get grid from GridStyleItem
GridStyleItem gridItem = null;
CIMMapGrid grid = await QueuedTask.Run<CIMMapGrid>(() =>
{
  return gridItem.Grid;
});
Get grid from GridStyleItem
GridStyleItem gridItem = null;
CIMMapGrid grid = await QueuedTask.Run<CIMMapGrid>(() =>
{
  return gridItem.Grid;
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also