مشاركة عبر


WorkbookBase.Theme الخاصية

يحصل على السمة التي هو تطبيقها على مصنف.

مساحة الاسم:  Microsoft.Office.Tools.Excel
التجميع:  Microsoft.Office.Tools.Excel.v4.0.Utilities (في Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

بناء الجملة

'إقرار
Public ReadOnly Property Theme As OfficeTheme
    Get
public OfficeTheme Theme { get; }

قيمة الخاصية

النوع: OfficeTheme
Microsoft.Office.Core.OfficeThemeالذي يمثل السمة المطبقة إلى مصنف.

أمثلة

مثال التعليمة البرمجية التالية استرداد السمة الحالية مصنف. مثال ثم يقوم بعرض أسماء خط الرئيسي والخط الثانوي في نظام خطوط السمة مصنف.

Th هو المثال هو لتخصيص المستوى مستند.

Private Sub GetDocumentTheme()
    Dim theme As Office.OfficeTheme = Me.Theme
    Dim fontScheme As Office.ThemeFontScheme = theme.ThemeFontScheme
    Dim majorFont As Office.ThemeFont = fontScheme.MajorFont.Item( _
        Microsoft.Office.Core.MsoFontLanguageIndex.msoThemeLatin)
    Dim minorFont As Office.ThemeFont = fontScheme.MinorFont.Item( _
        Microsoft.Office.Core.MsoFontLanguageIndex.msoThemeLatin)
    MessageBox.Show("Name of major font in current document theme: " _
                    + majorFont.Name)
    MessageBox.Show("Name of minor font in current document theme: " _
                    + minorFont.Name)
End Sub
private void GetDocumentTheme()
{
    Office.OfficeTheme theme = this.Theme;
    Office.ThemeFontScheme fontScheme = theme.ThemeFontScheme;
    Office.ThemeFont majorFont = fontScheme.MajorFont.Item(
        Microsoft.Office.Core.MsoFontLanguageIndex.msoThemeLatin);
    Office.ThemeFont minorFont = fontScheme.MinorFont.Item(
        Microsoft.Office.Core.MsoFontLanguageIndex.msoThemeLatin);
    MessageBox.Show("Name of major font in current document theme: "
                    + majorFont.Name);
    MessageBox.Show("Name of minor font in current document theme: "
                    + minorFont.Name);
}

أمن NET Framework.

راجع أيضًَا

المرجع

WorkbookBase الفئة

WorkbookBase الأعضاء

Microsoft.Office.Tools.Excel مساحة الاسم