Aracılığıyla paylaş


WorkbookBase.Theme Özellik

Tanım

Çalışma kitabına uygulanan temayı alır.

public:
 property Microsoft::Office::Core::OfficeTheme ^ Theme { Microsoft::Office::Core::OfficeTheme ^ get(); };
public Microsoft.Office.Core.OfficeTheme Theme { get; }
member this.Theme : Microsoft.Office.Core.OfficeTheme
Public ReadOnly Property Theme As OfficeTheme

Özellik Değeri

Çalışma kitabına uygulanan temayı temsil eden bir Microsoft.Office.Core.OfficeTheme.

Örnekler

Aşağıdaki kod örneği geçerli çalışma kitabının temasını alır. Örnek daha sonra çalışma kitabı temasının yazı tipi düzeninde bulunan ana yazı tipinin ve ikincil yazı tipinin adlarını görüntüler.

Bu örnek, belge düzeyinde özelleştirme içindir

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);
}
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

Şunlara uygulanır