SnagL™ integrators have the ability to configure various aspects of the experience. There are a couple of ways to accomplish this within SnagL™. The key/value pair configuration option offers a simple solution for configuring settings within the host markup file. This is a decent solution for users that prefer to be able to configure SnagL from within HTML markup, but it limits flexibility in that you are limited to keys with a single value. For those requiring more flexible configuration, SnagL™ has a built-in XML schema that allows integrators to modify configuration settings through the use of an external tool.

Key/Value Pair Configuration

The key/value pair configuration option allows integrators to modify SnagL™ settings from within the HTML markup. The configuration settings are passed into SnagL during initialization through the initParams parameter found in the SnagL™ markup:

<param name="initParams" value="loggerLevel=DEBUG,theme=Resources/default.xaml,loggerProvider=Logger.Provider.IsolatedStorage,preferencesProvider=Preference.Provider.IsolatedStorage,externalResourcesPath=SnagLExtenstionTutorial.xap;AnotherSnagLExtenstionTutorial.xap" />

The following settings are configurable via the initParams.
  • externalResourcesPath
    • Specifies a semicolon delimited list of paths to XAP files containing external resources (images)
  • extensionsPath
    • Specifies a semicolon delimited list of paths to XAP files containing external extensions (MEF plugins)
  • loggerLevel
    • Specifies the logger level
  • loggerProvider
    • Specifies the provider used for logging
  • preferencesProvider
    • Specifies the provider used for preferences
  • theme
    • Specifies a semicolon delimited list of paths to XAP files containing external themes

XML Configuration

The XML configuration option allows integrators to configure SnagL™ in a more robust XML format. For configuration settings to be loaded via the XML configuration utility, integrators must remove the initParams param element from within the SnagL™ markup and have access to a Windows Machine capable of running the SnagL™ Configuration Utility.

The SnagL™ Configuration Utility loads the SnagL™ XAP file located on the host. Click the Open button on the user interface and select the appropriate SnagL™ XAP file from the Open File dialog.

Once loaded, SnagL™ displays the internal configuration, which allows integrators to modify the values via XML. Clicking the Save button will save the configuration values back into the SnagL™ XAP file.


The following settings are configurable via the SnagL™ Configuration Utility.
  • extensions
    • extension
      • name – Specifies the name of the extension
      • path – Specifies the path to the extension
  • graphLabel
    • background – Specifies the background color
    • foreground – Specifies the foreground color
    • text – Specifies the text
  • loggerProvider
    • level – Specifies the logging level
    • provider – Specifies the logging provider
    • preferencesProvider
    • provider – Specifies the preferences provider
  • resources
    • resource
      • name – Specifies the name of the resource
      • path – Specifies the path to the resource
  • theme
    • value – Specifies the path to the external theme

Last edited Jan 15, 2013 at 1:32 PM by senfo, version 2

Comments

No comments yet.