Back to Devexpress

ThemeManager.SetThemeName(DependencyObject, String) Method

wpf-devexpress-dot-xpf-dot-core-dot-thememanager-dot-setthemename-x28-system-dot-windows-dot-dependencyobject-system-dot-string-x29.md

latest2.9 KB
Original Source

ThemeManager.SetThemeName(DependencyObject, String) Method

Sets the value of the ThemeManager.ThemeName property.

Namespace : DevExpress.Xpf.Core

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public static void SetThemeName(
    DependencyObject obj,
    string value
)
vb
Public Shared Sub SetThemeName(
    obj As DependencyObject,
    value As String
)

Parameters

NameTypeDescription
objDependencyObject

The element to which the attached property is written.

| | value | String |

A String value that specifies the theme name.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetThemeName(DependencyObject, String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-svg-images-use-palettes-to-replace-image-colors/CS/SVGPalettes/MainWindow.xaml.cs#L10

csharp
void OnOffice2016WhiteBarItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) {
    ThemeManager.SetThemeName(this, "Office2016White");
}

wpf-svg-images-use-palettes-to-replace-image-colors/VB/SVGPalettes/MainWindow.xaml.vb#L12

vb
Private Sub OnOffice2016WhiteBarItemClick(ByVal sender As Object, ByVal e As DevExpress.Xpf.Bars.ItemClickEventArgs)
    ThemeManager.SetThemeName(Me, "Office2016White")
End Sub

See Also

ThemeManager Class

ThemeManager Members

DevExpress.Xpf.Core Namespace