GetEffective

Theme.GetEffective 方法

获取应用了继承的有效主题数据。

public IThemeEffectiveData GetEffective()

返回值

一个 IThemeEffectiveData

示例

此示例演示如何获取有效的主题属性。

[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
	IThemeEffectiveData effectiveTheme  = pres.Slides[0].ThemeManager.OverrideTheme.GetEffective();

	Console.WriteLine("字体方案名称: " + effectiveTheme.FontScheme.Name);
	Console.WriteLine("主要拉丁字体: " + effectiveTheme.FontScheme.Major.LatinFont.FontName);
	Console.WriteLine("次要拉丁字体: " + effectiveTheme.FontScheme.Minor.LatinFont.FontName);
}

另见