GetEffective

TextStyle.GetEffective método

Obtiene datos de formato de estilo de texto efectivo con la herencia aplicada.

public ITextStyleEffectiveData GetEffective()

Valor de Retorno

Un ITextStyleEffectiveData.

Ejemplos

Este ejemplo demuestra cómo obtener algunas propiedades de estilo de texto efectivo.

[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
    IAutoShape shape = pres.Slides[0].Shapes[0] as IAutoShape;
    ITextStyleEffectiveData effectiveTextStyle = shape.TextFrame.TextFrameFormat.TextStyle.GetEffective();

    for (int i = 0; i <= 8; i++)
    {
        IParagraphFormatEffectiveData effectiveStyleLevel = effectiveTextStyle.GetLevel(i);
        Console.WriteLine("= Formato de párrafo efectivo para el nivel de estilo #" + i + " =");

        Console.WriteLine("Profundidad: " + effectiveStyleLevel.Depth);
        Console.WriteLine("Sangría: " + effectiveStyleLevel.Indent);
        Console.WriteLine("Alineación: " + effectiveStyleLevel.Alignment);
        Console.WriteLine("Alineación de fuente: " + effectiveStyleLevel.FontAlignment);
    }
}

Ver También