XamlToPng configuration settings reference

It is worth to make the steps to achive Intellisense in your config file for this section.

Sample config

<xamlToPng>
  <xamlTemplates defaultConnectionStringName="Catalog">
    <add key="sample" command="getMyData" xaml="~/Content/sample.xaml.config" assetsBasePath="~/Content/" data="sampleData" />
  </xamlTemplates>
  <data>
    <add key="sampleData" someCustomProperty="Wow this is it" otherCustomNamedProp="123"  />
  </data>
</xamlToPng>

configuration/xamlToPng/xamlTemplates

The collection node of the xamlToPng templates. It can have any number of child add item.

attribute type sample value description
defaultConnectionStringName string CatalogDBConnection This is a reference to one of the connection string entries in the ConnectionStrings collection of the configuration. Used by the child add elements when they have command attribute but does not have connectionStringName attribute

configuration/xamlToPng/xamlTemplates/add

attribute type sample value description
key string highlightedButton Required identity. Used by XamlToPng methods.
xaml path ~/Contents/my.xaml.config Required since this is the path to the xaml file to be processed.
command string dbo.getMyData This is a stored procedure name. It can have parameters. If it has then you can give those parameters with the XamlToPng methods. It will be executed on the connection the connectionStringName provides. The returning record (the first record if there are more than one) will be used as a DataContext of the xaml
connectionStringName string MyDatabaseConnection Required if command is not empty. This is a reference to one of the connection string entries in the ConnectionStrings collection of the configuration. Used to execute the command.
data string sampleData This is a reference to an item in the xamlToPng/data list. That item defines freely chosen attributes. Those attributes will be used as the DataContext of the xaml.
assetsBasePath path ~/Contents If you give the icon attribute as a relative path, this will be it's base path. This path can be a relative to the application's root as in this example or can be an absolute path in your harddrives or in the web.

configuration/xamlToPng/data/add

attribute type sample value description
key string highlightedButton Required identity. Used by the add elements above with their data attribute.
any1

1 You can write any number of attributes with any name and value. These attribute names will be used as object properties with the given value. This object will be the part of the XAML's DataContext.
If you made the steps to get intellisense in your config file, then this custom attributes will be detected as syntax errors, but you ought not to take care of it.

Last edited Feb 27, 2011 at 7:57 PM by Tocsi, version 11

Comments

No comments yet.