Configuration

The basic API exposed in SalApplication allows only for enabling/disabling skinning and for loading skin files and resources. To configure additional properties in the skinning engine you have to either use the VisualStyler component directly (see Help and API) or configure the App.config file.

Using the App.config file to control skinning allows to configure skinning from outside of the application's executable.

The quickest and easiest way to edit the App.config file is to use our Configuration Tool.

<configuration>
  <configSections>
    <section 
      name="SalSkinner" 
      type="PPJ.Runtime.Windows.Skins.SalSkinnerConfiguration, PPJ.Runtime.46, Version=4.6.1, Culture=neutral, PublicKeyToken=17bef35e11b84171"/>
</configSections>        

<SalSkinner 
   Enabled="True|False"
   SkinCommonDialogs="True|False"
   SkinLocation="[Resources|Directory][Assembly]:{path}"
   SkinName="{file name}"
   UseSystemFonts="True|False"
   TargetControls="None|Forms|Controls|FormsAndControls"
   ShadowStyle="None|Small|Medium|Bold"
   HookSystemColors="True|False"
   />
</configuration>

Enabled="True|False"

Enables or disables skinning for the entire application.

SkinCommonDialogs="True|False"

Enables or disables skinning of all system and common dialogs, including all file dialogs, message boxes, etc.

SkinLocation="[Resources|Directory|Assembly]:{path}"

Sets the location of the skin resources. This setting is necessary if used with the SkinName setting. The path string must be prefixed by either "Resources:" or "Directory:". When using "Resources:" the path is the standard .NET resources path. Use "Assembly" to load skin from a separate assembly.

For example:

SkinLocation="Resources:ACME.MainApp.Resources.Skins"
SkinLocation="Directory:.\skins"
SkinLocation="Assembly:ACME.MainApp"

SkinName="{file name}"

This is the name of the skin file to load from the location indicated in SkinLocation.

UseSystemFonts="True|False"

When set to True, the skinning engine ignores the skins' fonts and uses the system's fonts.

TargetControl="None|Forms|Controls|FormsAndControls"

Enables skinning for the specified category. This is useful to turn off skinning for the forms frames on Vista systems, for example, when you may want to preserve the Aero look while still skinning all child controls.

ShadowStyle="None|Small|Medium|Bold"

Enables drawing of the shadow effect for forms and dialogs.

HookSystemColors="True|False"

When set to true (default), the skinning engine replaces the system colors returned to the application with their equivalent skinned colors.

Last updated