WinForms Skins - Save the name of the active skin and restore it the next time you run the application
This example demonstrates how to persist application settings between sessions. The example saves the SkinName
property.
public partial class Form1 : XtraForm {
public Form1() {
InitializeComponent();
SkinHelper.InitSkinGallery(galleryControl1);
UserLookAndFeel.Default.SkinName = Settings.Default["ApplicationSkinName"].ToString();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e) {
Settings.Default["ApplicationSkinName"] = UserLookAndFeel.Default.SkinName;
Settings.Default.Save();
}
}
- Form1.cs (VB: Form1.vb)
- Program.cs (VB: Program.vb)