MasterTheme

Propriété Presentation.MasterTheme

Retourne le thème maître. Lecture seule IMasterTheme.

public IMasterTheme MasterTheme { get; }

Exemples

Les exemples suivants montrent comment changer un effet de thème en modifiant des parties d’éléments de la présentation PowerPoint.

[C#]
//Instancier un objet presentation qui représente un fichier de présentation
using (Presentation pres = new Presentation("Subtle_Moderate_Intense.pptx"))
{
    pres.MasterTheme.FormatScheme.LineStyles[0].FillFormat.SolidFillColor.Color = Color.Red;
    pres.MasterTheme.FormatScheme.FillStyles[2].FillType = FillType.Solid;
    pres.MasterTheme.FormatScheme.FillStyles[2].SolidFillColor.Color = Color.ForestGreen;
    pres.MasterTheme.FormatScheme.EffectStyles[2].EffectFormat.OuterShadowEffect.Distance = 10f;
    pres.Save("Design_04_Subtle_Moderate_Intense-out.pptx", SaveFormat.Pptx);
}

Voir aussi