2017-12-03 86 views
-1

我在Aspose Words模板中有一個現有的表格,我想更改行內的背景圖案顏色。我怎樣才能實現它?aspose word table set BackgroundPatternColor

public static void SetColor(ref Table table) 
{ 
    Row row =table.Rows[1]; 
} 
+0

有你看了[閱讀Aspose字文檔(https://docs.aspose.com/display/cellsnet/Changing+the+Font+and+Color+of+a+Cell)你可以剛剛做了谷歌搜索.. – MethodMan

+0

我不與建設者一起工作! –

回答

1
public static void SetColor(ref Table table) 
{ 
    Row t = table.Rows[1]; 
    foreach (Cell c in t.GetChildNodes(NodeType.Cell, true)) 
    { 
      c.CellFormat.Shading.BackgroundPatternColor = Color.FromArgb(198, 217, 241); 
    } 
} 
+0

刪除它並將其添加到您原來的問題中,直接點擊您發佈的原始問題下的編輯鏈接 – MethodMan