Hi,
Yes, you can already provide a choice of skins to the end user using the
ShowStyleBrowserDialog function.
You just need to deploy one or more VSSF files into the same folder as your application and call this method.
The following sample code demonstrates how to implement this feature.C# sample codeCode:
private void btnChooseSkin_Click(object sender, EventArgs e)
{
// Show the built-in style browser dialog
string selectedStyle;
if ( visualStyler1.ShowStyleBrowserDialog("Select a skin", null, out selectedStyle) == DialogResult.OK )
{
// Load the selected style
visualStyler1.LoadVisualStyle(selectedStyle);
}
}
VB.Net sample codeCode:
Private Sub btnChooseSkin_Click(ByVal sender As Object, ByVal e As EventArgs)
' Show the built-in style browser dialog
Dim selectedStyle As String
If visualStyler1.ShowStyleBrowserDialog("Select a skin", Nothing, selectedStyle) = DialogResult.OK Then
' Load the selected style
visualStyler1.LoadVisualStyle(selectedStyle)
End If
End Sub
You can also specify an existing folder path for the
filePath argument, if it's null then the
application folder is used.
When the user clicks on the button, the following dialog will display a preview of each style you've provided.
When the user selects a style and clicks OK, the style is loaded and applied to the current application UI.