The following code is in xslt (I cut out irrelevant parts, get-textblock is much longer and has many parameters that are all passed correctly):
<xsl:template name="get-textblock">
<xsl:param name="style"/>
<xsl:element name="Border">
<xsl:if test="$style='{StaticResource LabelText}'" >
<xsl:attribute name="Background">#FF3B596E</xsl:attribute>
</xsl:if>
<xsl:attribute name="Background">#FF3B5940</xsl:attribute>
</xsl:element>
</xsl:template>
The style parameter can be "{StaticResource LabelText}" or "{StaticResource ValueText}", and the border background depends on this value.
If the structure does not work, it always draws the border of FF3B5940 in my output.xaml file. I invoke the template as follows:
<xsl:call-template name="get-textblock">
<xsl:with-param name="style">{StaticResource LabelText}</xsl:with-param>
</xsl:call-template>
Does anyone see what could be the problem? Thank.
source
share