internal class Button1 : Button { protected override void OnClick() { var layout = LayoutView.Active.Layout; if (layout == null) return; QueuedTask.Run(() => { var tableFrame = layout.GetElements().OfType<TableFrame>().FirstOrDefault(); if (tableFrame != null) { //change the text symbol //the property panel conflates the symbols for each field var frame_def = tableFrame.GetDefinition() as CIMTableFrame; var fields = frame_def.Fields?.ToList() ?? new List<CIMTableFrameField>(); var green = ColorFactory.Instance.CreateColor( System.Windows.Media.Colors.ForestGreen); var size = 11; var fontName = "Bernard MT Condensed"; var textSymbol = SymbolFactory.Instance.ConstructTextSymbol(green, size, fontName); foreach (var frameField in fields) { //to mimic the property sheet, change heading and field symbols frameField.HeadingTextSymbol.Symbol = textSymbol; frameField.TextSymbol.Symbol = textSymbol; } //these are defaults for new fields - optional - but, based on //some experimentation, they need to match if u want the property //sheet to show the changed symbology. frame_def.DefaultTableFrameField.HeadingTextSymbol.Symbol = textSymbol; frame_def.DefaultTableFrameField.TextSymbol.Symbol = textSymbol; //commit the changes tableFrame.SetDefinition(frame_def); } }); } }