async public static void ModifyExisting() { #region TableFrame_ModifyExisting //Modify an existing tableframe using CIM properties. //Reference the active layout Layout layout = LayoutView.Active.Layout; //Perform on the worker thread await QueuedTask.Run(() => { //Reference table frame TableFrame TF = layout.FindElement("Table Frame") as TableFrame; //Modify CIM properties CIMTableFrame cimTF = TF.GetDefinition() as CIMTableFrame; cimTF.Alternate1RowBackgroundCount = 1; cimTF.Alternate2RowBackgroundCount = 1; //Apply the changes TF.SetDefinition(cimTF); }); #endregion TableFrame_ModifyExisting }
public async void Examples() { #region Get symbol from SymbolStyleItem SymbolStyleItem symbolItem = null; CIMSymbol symbol = await QueuedTask.Run <CIMSymbol>(() => { return(symbolItem.Symbol); }); #endregion #region Get color from ColorStyleItem ColorStyleItem colorItem = null; CIMColor color = await QueuedTask.Run <CIMColor>(() => { return(colorItem.Color); }); #endregion #region Get color ramp from ColorRampStyleItem ColorRampStyleItem colorRampItem = null; CIMColorRamp colorRamp = await QueuedTask.Run <CIMColorRamp>(() => { return(colorRampItem.ColorRamp); }); #endregion #region Get north arrow from NorthArrowStyleItem NorthArrowStyleItem northArrowItem = null; CIMNorthArrow northArrow = await QueuedTask.Run <CIMNorthArrow>(() => { return(northArrowItem.NorthArrow); }); #endregion #region Get scale bar from ScaleBarStyleItem ScaleBarStyleItem scaleBarItem = null; CIMScaleBar scaleBar = await QueuedTask.Run <CIMScaleBar>(() => { return(scaleBarItem.ScaleBar); }); #endregion #region Get label placement from LabelPlacementStyleItem LabelPlacementStyleItem labelPlacementItem = null; CIMLabelPlacementProperties labelPlacement = await QueuedTask.Run <CIMLabelPlacementProperties>(() => { return(labelPlacementItem.LabelPlacement); }); #endregion #region Get grid from GridStyleItem GridStyleItem gridItem = null; CIMMapGrid grid = await QueuedTask.Run <CIMMapGrid>(() => { return(gridItem.Grid); }); #endregion #region Get legend from LegendStyleItem LegendStyleItem legendItem = null; CIMLegend legend = await QueuedTask.Run <CIMLegend>(() => { return(legendItem.Legend); }); #endregion #region Get table frame from TableFrameStyleItem TableFrameStyleItem tableFrameItem = null; CIMTableFrame tableFrame = await QueuedTask.Run <CIMTableFrame>(() => { return(tableFrameItem.TableFrame); }); #endregion #region Get map surround from MapSurroundStyleItem MapSurroundStyleItem mapSurroundItem = null; CIMMapSurround mapSurround = await QueuedTask.Run <CIMMapSurround>(() => { return(mapSurroundItem.MapSurround); }); #endregion }