GetEffective

CellFormat.GetEffective method

Ruft effektive Formatierungseigenschaften für Tabellenzellen ab, wobei Vererbung und Tabellenstile angewendet werden.

public ICellFormatEffectiveData GetEffective()

Rückgabewert

EINICellFormatEffectiveData.

Beispiele

Dieses Beispiel demonstriert das Erhalten eines effektiven Füllformats für verschiedene Teile der Tabellenlogik. Bitte beachten Sie, dass die Zellenformatierung immer eine höhere Priorität hat als die Zeilenformatierung, Zeilen - höher als Spalten, Spalten - höher als die gesamte Tabelle. Also schließlich CellFormatEffectiveData-Eigenschaften, die immer zum Zeichnen verwendet werden Die Tabelle. Der folgende Code ist nur ein Beispiel für API.

[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
    ITable tbl = pres.Slides[0].Shapes[0] as ITable;
    IFillFormatEffectiveData tableFillFormatEffective = tbl.TableFormat.GetEffective().FillFormat;
    IFillFormatEffectiveData rowFillFormatEffective = tbl.Rows[0].RowFormat.GetEffective().FillFormat;
    IFillFormatEffectiveData columnFillFormatEffective = tbl.Columns[0].ColumnFormat.GetEffective().FillFormat;
    IFillFormatEffectiveData cellFillFormatEffective = tbl[0, 0].CellFormat.GetEffective().FillFormat;
    /* Output and comparison */
}

Siehe auch