Tacepao configuration settings reference

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

tacepaosamplestitled.png

Sample config

<tacepao>
    <properties defaultFontFamily="Verdana" defaultFontSize="15.5" >
        <add key="sample" borderColor="#444444" borderThickness="3 3 3 6" cornerRadius="5 5 0 0" backgroundColor="#00aa00" />
        <add key="turnedOn"   basedOn="sample" foreColor="Yellow" />
    </properties>
<tacepao>

configuration/tacepao/properties

The collection node of the Tacepao properties with some default values for the child add items. 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
defaultIconBasePath path ~/Contents The child elements have an icon attribute which is a path to an image. This is the basepath for that icon path if it is a relative path and the add item has no iconBasePath attribute.
defaultFontFamily string Times New Roman This is the font's name for the rendered text if a child element does not have a fontFamily attribute.
defaultFontSize decimal 30.5 This is the default font size in WPF units (let's say in pixels) for the add elements that have no fontSize attribute.

configuration/tacepao/properties/add

Visual style properties for an image rendering task with Tacepao

infrastructural attributes

attribute type sample value description
key string highlightedButton Required identity. Used by Tacepao methods
imageBackgroundColor Color #FFAA00 Defaults to Transparent. The color of the background of the whole image. It is useful when you choose jpeg format.
imageFormat ImageFormat Png Defaults to Png. It is the format of the generated image.
basedOn string button This is a reference to an other add element in the tacepao/properties list. The given elements attributes will be used if this element has no value for them.
iconBasePath 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.
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 Tacepao methods. It will be executed on the connecton the connectionStringName provides. The returning record (the first record if there are more than one) will be used to override these settings. You just have to return columns of your choice and named like these attributes. There is an exceptional attribute, the icon. You can return an icon path with a column name IconUrl (it can be relative or absolute) or you can return the icon bytes with a blob field with the name of IconBytes.
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.

border and background attributes

attribute type sample value description
borderColor Color #FFAA00 Defaults to Transparent. The color of the outer border.
borderThickness Thickness 5,10,5,8 Defaults to 0. The thickness of the outer border's sides.
cornerRadius CornerRadius 5 Defaults to 0. The radius of the border's corners.
darkColor Color DarkGreen Defaults to Transparent. You can fill the background with a linear gradient from top to bottom. This is the bottom color of the gradient. If it is empty (not given) then the backgroundColor will be used instead.
backgroundColor Color Green Defaults to Transparent. You can fill the background with a linear gradient from top to bottom. This is the middle color of the gradient. It is the default value for the darkColor and the light color too.
lightColor Color LightGreen Defaults to Transparent. You can fill the background with a linear gradient from top to bottom. This is the top color of the gradient. If it is empty (not given) then the backgroundColor will be used instead.
padding Thickness 5,10,5,8 Defaults to 0. The space between the text and the border.
margin Thickness 5,10,5,8 Defaults to 0. The space between the border and the edge of the generated image. Outside the border there will be a transparent area on the generated png. If you use background color and shadow there must be enough space in this area for the shadow to be on the image.

text and icon attributes

attribute type sample value description
foreColor Color Black Defaults to Black. Color for the text.
fontFamily string Times New Roman The name of the font to be uset for the text. If it is empty or an invalid name, then the system's default font will be used.
fontSize decimal 25.7 The size of the font used for the text. I fit is emty or invalid, then the WPF's default size will be used.
fontWeight FontWeight Bold Defaults to Normal.
fontStyle FontStyle Italic Defaults to Normal.
fontStretch FontStretch Normal Defaults to Normal.
icon path nalogo.png A path to an icon to be used in the tacepao.
iconWidth decimal 0.7 The explicit width for the icon. The icon can be smaller than this value if the iconHeight is used too because there will be a proportional resizing. If neither value have been given, then the picture original size will be used.
iconHeight decimal 0.7 The explicit height for the icon. The icon can be smaller than this value if the iconWidth is used too because there will be a proportional resizing. If neither value have been given, then the picture original size will be used.
gap decimal 0.7 Defaults to 0. This is the space must be left free between the icon and the text.
iconPosition IconPositions Left Defaults to Left. The icon can be placed around or begind the text. It will be always aligned in the middle if the text is greater then the icon.

shadow attributes

attribute type sample value description
shadowColor Color Black Defaults to black. The color of the shadow for the whole image. The shadow will be rendered only if the shadowOpacity is greater than 0. There must be enough space around the image to see the sahdow. This can be achive with the margin attribute.
shadowOpacity decimal 0.7 Defaults to 0. 1 means full opaque and 0 means full transparent.
shadowBlurRadius decimal 5.7 How strong the shadow blur have to be.
shadowDirection decimal 30.7 The shadow direction in degree. 0 means right, 90 menas staright downwards.
shadowDepth decimal 4.7 How far the shadow will be from the image.
contentShadowColor Color Black Defaults to Black. Content shadow will be rendered only if the contentShadowOpacity is greater than 0. This shadow will be applied for the text and the icon only. If you use background color other than Transparent, then the shadow for the whole image will be under the background. In this case if you want to render a shadow (or glow) for the text you have to use content shadow.
contentShadowOpacity decimal 0.7 Defaults to 0. 1 means full opaque and 0 means full transparent.
contentShadowBlurRadius decimal 5.7 How strong the shadow blur have to be.
contentShadowDirection decimal 30.7 The shadow direction in degree. 0 means right, 90 menas staright downwards.
contentShadowDepth decimal 4.7 How far the shadow will be from the image.

highlight attributes

attribute type sample value description
highlightColor Color #FFFFAA Defaults to Transparent. The highlight will be rendeed only if the highlightOpacity is greater then 0. The highlight will be rendered on top of everything. It is a gradient filled area inside the border and with the same corner radius as the border has. The gradient is from this color to transparent.
highlightOpacity decimal 0.7 Defaults to 0. 1 means full opaque and 0 means full transparent.
highlightBlurRadius decimal 0.7 How strong the highlight blur have to be.
highlightMargin Thickness 2 2 2 2 The highlight shape's margin.
highlightTransparentOffset decimal 0.7 Defaults to 1. The highlight is a solid gradient from highlightColor to transparent. The bottom of the highlight has the offset value 1. So if you give this a smaller value than 1 then it will sooner reach the transparent. If you give it a larger number then it will never reach the transparent, but will have an edge at the bottom.

size and rotation attributes

attribute type sample value description
rotation decimal 40.7 Defaults to 0 degree. It rotates the whole image. Shadow for the whole image won't change it's direction with the rotation. The content shadow does.
contentRotation decimal -40.7 Defaults to 0 degree. It rotates the content iside the border. The border will grow automatically to give space for the rotated content.
width decimal 200.7 If you give this number, then the rendered image will have this width. If the content is larger then it will be cropped, if smaller then it will have an extra space. The border will resize with the whole image.
height decimal 80.7 If you give this number, then the rendered image will have this height. If the content is larger then it will be cropped, if smaller then it will have an extra space. The border will resize with the whole image.




Last edited Feb 27, 2011 at 8:41 PM by Tocsi, version 13

Comments

No comments yet.