Applying Themes in TextBoxExt
The ThemesEnabled property specifies whether XPThemes should be used or not when BorderStyle is set to Fixed3D
.
this.textBoxExt1.ThemesEnabled = true;
Me.textBoxExt1.ThemesEnabled = True
Themes
The TextBoxExt provides the following themes for professional representation.
- Office2016Colorful
- Office2016White
- Office2016DarkGray
- Office2016Black
- Office2019Colorful
- HighContrastBlack
The themes can be applied by following these steps.
- Load theme assembly
- Apply theme
Load theme assembly
To set theme to TextBoxExt
, the following assemblies should be added as reference in any application.
Assemblies |
Themes |
Syncfusion.Office2016Theme.WinForms |
Office2016Colorful Office2016White Office2016DarkGray Office2016Black |
Syncfusion.Office2019Theme.WinForms | Office2019Colorful |
Syncfusion.HighContrastTheme.WinForms | HighContrastBlack |
Before applying theme to TextBoxExt
, required theme assembly should be loaded.
using Syncfusion.Windows.Forms;
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
SkinManager.LoadAssembly(typeof(Syncfusion.WinForms.Themes.Office2016Theme).Assembly);
SkinManager.LoadAssembly(typeof(Syncfusion.WinForms.Themes.Office2019Theme).Assembly);
SkinManager.LoadAssembly(typeof(Syncfusion.HighContrastTheme.WinForms.HighContrastTheme).Assembly);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
Imports Syncfusion.Windows.Forms
Friend NotInheritable Class Program
''' <summary>
''' The main entry point for the application.
''' </summary>
Private Sub New()
End Sub
<STAThread>
Shared Sub Main()
SkinManager.LoadAssembly(GetType(Syncfusion.WinForms.Themes.Office2016Theme).Assembly)
SkinManager.LoadAssembly(GetType(Syncfusion.WinForms.Themes.Office2019Theme).Assembly)
SkinManager.LoadAssembly(GetType(Syncfusion.HighContrastTheme.WinForms.HighContrastTheme).Assembly)
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(False)
Application.Run(New Form1())
End Sub
End Class
Apply theme
You can change the appearance of TextBoxExt control by using ThemeName property.
this.textBoxExt1.ThemeName = "Office2019Colorful";
Me.textBoxExt1.ThemeName = "Office2019Colorful"
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page