diff --git a/WindowsForms-toc.html b/WindowsForms-toc.html index bf32a4e9d..88243538e 100644 --- a/WindowsForms-toc.html +++ b/WindowsForms-toc.html @@ -4581,6 +4581,9 @@
  • Context Menu
  • +
  • + Themes +
  • diff --git a/WindowsForms/Tabbed-Form/Overview.md b/WindowsForms/Tabbed-Form/Overview.md index d26392ec6..6a331f78c 100644 --- a/WindowsForms/Tabbed-Form/Overview.md +++ b/WindowsForms/Tabbed-Form/Overview.md @@ -20,4 +20,5 @@ SfTabbedForm provides the following key features: * Closes the tabs using the close button in tab header. * Customizes the appearance of the tabs. * Customizes the appearance of the title bar. -* Provides smooth scrolling experience even when tabs overflow into the tab panel. \ No newline at end of file +* Provides smooth scrolling experience even when tabs overflow into the tab panel. +* Supports set of visual styles to customize the look and feel of SfTabbedForm control. \ No newline at end of file diff --git a/WindowsForms/Tabbed-Form/Themes.md b/WindowsForms/Tabbed-Form/Themes.md new file mode 100644 index 000000000..a435f35db --- /dev/null +++ b/WindowsForms/Tabbed-Form/Themes.md @@ -0,0 +1,243 @@ +--- +layout: post +title: Themes in Windows Forms Tabbed Form control | Syncfusion® +description: Learn about Themes support in Syncfusion® Windows Forms Tabbed Form (SfTabbedForm) control, its elements and more details. +platform: windowsforms +control: SfTabbedForm +documentation: ug +--- + +# Themes in Windows Forms Tabbed Form (SfTabbedForm) + +[Windows Forms Tabbed Form](https://www.syncfusion.com/winforms-ui-controls/tabbed-form) (SfTabbedForm) offers the following built-in themes for professional representation: + +* Office2016Colorful +* Office2016White +* Office2016DarkGray +* Office2016Black +* Office2019Colorful +* HighContrastBlack + +Themes can be applied to `SfTabbedForm` by following these steps: + +* `Load theme assembly` +* `Overriding theme style` +* `Apply theme` +* `Apply theme to entire application` + +## Load theme assembly + +To set theme to `SfTabbedForm`, the following assemblies should be added as reference in any application. + + + + + + + + + + + + + + + + + + +
    +{{'**Assemblies**'| markdownify }} + +{{' **Themes**'| markdownify }} +
    +Syncfusion.Office2016Theme.WinForms + +Office2016Colorful
    +Office2016White
    +Office2016DarkGray
    +Office2016Black +
    +Syncfusion.Office2019Theme.WinForms + +Office2019Colorful +
    +Syncfusion.HighContrastTheme.WinForms + +HighContrastBlack +
    + +Before applying theme to `SfTabbedForm`, required theme assembly should be loaded. + +{% tabs %} +{% highlight c# %} +using Syncfusion.WinForms.Controls; + +static class Program +{ + /// + /// The main entry point for an application. + /// + [STAThread] + static void Main() + { + Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(DemoCommon.FindLicenseKey()); + SfSkinManager.LoadAssembly(typeof(Syncfusion.WinForms.Themes.Office2016Theme).Assembly); + SfSkinManager.LoadAssembly(typeof(Syncfusion.WinForms.Themes.Office2019Theme).Assembly); + SfSkinManager.LoadAssembly(typeof(Syncfusion.HighContrastTheme.WinForms.HighContrastTheme).Assembly); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } +} +{% endhighlight %} +{% highlight vb %} +Imports Syncfusion.WinForms.Controls + +Friend NotInheritable Class Program + ''' + ''' The main entry point for the application. + ''' + Private Sub New() + End Sub + + Shared Sub Main() + Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(DemoCommon.FindLicenseKey()) + SfSkinManager.LoadAssembly(GetType(Syncfusion.WinForms.Themes.Office2016Theme).Assembly) + SfSkinManager.LoadAssembly(GetType(Syncfusion.WinForms.Themes.Office2019Theme).Assembly) + SfSkinManager.LoadAssembly(GetType(Syncfusion.HighContrastTheme.WinForms.HighContrastTheme).Assembly) + Application.EnableVisualStyles() + Application.SetCompatibleTextRenderingDefault(False) + Application.Run(New Form1()) + End Sub +End Class +{% endhighlight %} +{% endtabs %} + +## Overriding theme style + +By default, the appearance customization settings done at the control level will not be overridden by the theme. To allow the theme to override these customizations, set the [CanOverrideStyle](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.Controls.SfTabbedForm.html#Syncfusion_WinForms_Controls_SfTabbedForm_CanOverrideStyle) property to `true`. + +{% tabs %} +{% highlight c# %} + CanOverrideStyle = true; + this.ThemeName = "Office2019Colorful"; +{% endhighlight %} +{% highlight vb %} + CanOverrideStyle = True + Me.ThemeName = "Office2019Colorful" +{% endhighlight %} +{% endtabs %} + +## Apply theme + +The appearance of `SfTabbedForm` can be changed using [ThemeName](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.Controls.SfTabbedForm.html#Syncfusion_WinForms_Controls_SfTabbedForm_ThemeName) of `SfTabbedForm`. + +### Office2016Colorful + +This option helps to set the Office2016Colorful theme. + +{% tabs %} +{% highlight c# %} + this.ThemeName = "Office2016Colorful"; +{% endhighlight %} +{% highlight vb %} + Me.ThemeName = "Office2016Colorful" +{% endhighlight %} +{% endtabs %} + +![Office2016Colorful theme applied in winforms SfTabbedForm](Themes_images/Themes_img1.png) + +### Office2016White + +This option helps to set the Office2016White theme. + +{% tabs %} +{% highlight c# %} + this.ThemeName = "Office2016White"; +{% endhighlight %} +{% highlight vb %} + Me.ThemeName = "Office2016White" +{% endhighlight %} +{% endtabs %} + +![Office2016White theme applied in winforms sfform](Themes_images/Themes_img2.png) + +### Office2016DarkGray + +This option helps to set the Office2016DarkGray theme. + +{% tabs %} +{% highlight c# %} + this.ThemeName = "Office2016DarkGray"; +{% endhighlight %} +{% highlight vb %} + Me.ThemeName = "Office2016DarkGray" +{% endhighlight %} +{% endtabs %} + +### Office2016Black + +This option helps to set the Office2016Black theme. + +{% tabs %} +{% highlight c# %} + this.ThemeName = "Office2016Black"; +{% endhighlight %} +{% highlight vb %} + Me.ThemeName = "Office2016Black" +{% endhighlight %} +{% endtabs %} + +![Office2016Black theme applied in winforms sfform](Themes_images/Themes_img4.png) + +### Office2019Colorful + +This option helps to set the Office2019Colorful theme. + +{% tabs %} +{% highlight c# %} + this.ThemeName = "Office2019Colorful"; +{% endhighlight %} +{% highlight vb %} + Me.ThemeName = "Office2019Colorful" +{% endhighlight %} +{% endtabs %} + +![Office2019Colorful theme applied in winforms sfform](Themes_images/Themes_img5.png) + + +### HighContrastBlack + +This option helps to set the HighContrastBlack theme. + +{% tabs %} +{% highlight c# %} + this.ThemeName = "HighContrastBlack"; +{% endhighlight %} +{% highlight vb %} + Me.ThemeName = "HighContrastBlack" +{% endhighlight %} +{% endtabs %} + +![Highcontrastblack theme applied in winforms sfform](Themes_images/Themes_img6.png) + +## Apply theme to entire application + +Skin manager allows to apply theme for all the controls and forms in an application by setting the [ApplicationVisualTheme](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.SkinManager.html#Syncfusion_Windows_Forms_SkinManager_ApplicationVisualTheme) property. It allows you to theme entire application using single `ApplicationVisualTheme` property. + +{% tabs %} +{% highlight c# %} + +static void Main() +{ + SfSkinManager.ApplicationVisualTheme = "Office2019Colorful"; + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); +} + +{% endhighlight %} +{% endtabs %} + +N> Set the `ApplicationVisualTheme` property before main form is initialized. diff --git a/WindowsForms/Tabbed-Form/Themes_images/Themes_img1.png b/WindowsForms/Tabbed-Form/Themes_images/Themes_img1.png new file mode 100644 index 000000000..953baa812 Binary files /dev/null and b/WindowsForms/Tabbed-Form/Themes_images/Themes_img1.png differ diff --git a/WindowsForms/Tabbed-Form/Themes_images/Themes_img2.png b/WindowsForms/Tabbed-Form/Themes_images/Themes_img2.png new file mode 100644 index 000000000..d24de21d0 Binary files /dev/null and b/WindowsForms/Tabbed-Form/Themes_images/Themes_img2.png differ diff --git a/WindowsForms/Tabbed-Form/Themes_images/Themes_img3.png b/WindowsForms/Tabbed-Form/Themes_images/Themes_img3.png new file mode 100644 index 000000000..15d19205a Binary files /dev/null and b/WindowsForms/Tabbed-Form/Themes_images/Themes_img3.png differ diff --git a/WindowsForms/Tabbed-Form/Themes_images/Themes_img4.png b/WindowsForms/Tabbed-Form/Themes_images/Themes_img4.png new file mode 100644 index 000000000..e79c8b60c Binary files /dev/null and b/WindowsForms/Tabbed-Form/Themes_images/Themes_img4.png differ diff --git a/WindowsForms/Tabbed-Form/Themes_images/Themes_img5.png b/WindowsForms/Tabbed-Form/Themes_images/Themes_img5.png new file mode 100644 index 000000000..033f4e293 Binary files /dev/null and b/WindowsForms/Tabbed-Form/Themes_images/Themes_img5.png differ diff --git a/WindowsForms/Tabbed-Form/Themes_images/Themes_img6.png b/WindowsForms/Tabbed-Form/Themes_images/Themes_img6.png new file mode 100644 index 000000000..5a9ff3647 Binary files /dev/null and b/WindowsForms/Tabbed-Form/Themes_images/Themes_img6.png differ