diff --git a/WIndows.Forms/Controls/ThemedLabel.cs b/WIndows.Forms/Controls/ThemedLabel.cs
index 0a8dc84d..85b583eb 100644
--- a/WIndows.Forms/Controls/ThemedLabel.cs
+++ b/WIndows.Forms/Controls/ThemedLabel.cs
@@ -143,6 +143,10 @@ namespace Vanara.Windows.Forms
ResetTheme();
}
+ /// Sets the theme using information.
+ /// The visual style.
+ public void SetTheme(System.Windows.Forms.VisualStyles.VisualStyleElement visualStyle) => SetTheme(visualStyle?.ClassName, visualStyle?.Part ?? 0, visualStyle?.State ?? 0);
+
internal static Rectangle DeflateRect(Rectangle rect, Padding padding)
{
rect.X += padding.Left;
diff --git a/WIndows.Forms/Controls/ThemedPanel.cs b/WIndows.Forms/Controls/ThemedPanel.cs
index defd2bd5..8e68a910 100644
--- a/WIndows.Forms/Controls/ThemedPanel.cs
+++ b/WIndows.Forms/Controls/ThemedPanel.cs
@@ -94,6 +94,10 @@ namespace Vanara.Windows.Forms
ResetTheme();
}
+ /// Sets the theme using information.
+ /// The visual style.
+ public void SetTheme(VisualStyleElement visualStyle) => SetTheme(visualStyle?.ClassName, visualStyle?.Part ?? 0, visualStyle?.State ?? 0);
+
/// Raises the event.
/// A that contains the event data.
protected override void OnPaint(PaintEventArgs e)
diff --git a/WIndows.Forms/Controls/ThemedTableLayoutPanel.cs b/WIndows.Forms/Controls/ThemedTableLayoutPanel.cs
index cd5c2f8e..977f9b6c 100644
--- a/WIndows.Forms/Controls/ThemedTableLayoutPanel.cs
+++ b/WIndows.Forms/Controls/ThemedTableLayoutPanel.cs
@@ -96,6 +96,10 @@ namespace Vanara.Windows.Forms
ResetTheme();
}
+ /// Sets the theme using information.
+ /// The visual style.
+ public void SetTheme(VisualStyleElement visualStyle) => SetTheme(visualStyle?.ClassName, visualStyle?.Part ?? 0, visualStyle?.State ?? 0);
+
/// Raises the event.
/// A that contains the event data.
protected override void OnPaint(PaintEventArgs e)