次の方法で共有


ThmxTheme.GetThemeShadeByNameOrNull method

Gets a theme shade by name or null if no such theme shade exists in this theme

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function GetThemeShadeByNameOrNull ( _
    themeColorName As String, _
    fixContrast As Boolean _
) As Nullable(Of Color)
'Usage
Dim instance As ThmxTheme
Dim themeColorName As String
Dim fixContrast As Boolean
Dim returnValue As Nullable(Of Color)

returnValue = instance.GetThemeShadeByNameOrNull(themeColorName, _
    fixContrast)
public Nullable<Color> GetThemeShadeByNameOrNull(
    string themeColorName,
    bool fixContrast
)

Parameters

  • themeColorName
    Type: System.String

    A theme shade name string of the format: ColorName[-ShadeName] where valid ShadeNames are: Darkest, Darker, Medium, Lighter, Lightest (and no shade to get the color's default shade).

  • fixContrast
    Type: System.Boolean

    Whether to edit the contrast of the color based on whether the theme as a whole is inverted.

Return value

Type: System.Nullable<Color>
A color representing the theme shade or null if no such theme shade exists in this theme.

Implements

ISPTheme.GetThemeShadeByNameOrNull(String, Boolean)

See also

Reference

ThmxTheme class

ThmxTheme members

Microsoft.SharePoint.Utilities namespace