Visual Studio Development Bookmark and Share   
 index > Developer Documentation and Help System > Sandcastle and <span style> Tag
 

Sandcastle and <span style> Tag

Hi
We use Sanddcastle to build our online-Docs.
I try to highlight a sequence in <Code> with the <span style> Tag.
But Sandcastle ignore the Tag and handle it as a part of the "Code".

Is that kind of feature not supported in Sandcastle?
(We use Sandcastle 1.8.0.1)

Best regards¨
Horst


My <example> Code-sniped:

<Code>
&lt;VFC:MacroCommand.Commands&gt;

''' &lt;!--&lt;VFC:SetPropertyCommand PropertyName="IncludeXaml" PropertyValue="Uebersichten" TargetElementName="PatientDossier_pnl_Content" /&gt;--&gt;
''' &lt;VFC:SetPropertyOnTabItemCommand PropertyName="IsChecked" PropertyValue="True" TargetElementName="PatientDossierDisplayContent_rb_Uebersichten" /&gt;
''' &lt;VFC:SetPropertyCommand PropertyName="IncludeXaml" PropertyValue="NavigationKontextUebersichten" TargetElementName="NavigationPatientDossierKontext_pnl_Include" /&gt;
''' <span style="background-color:lightgreen; color:red">&lt;VFC:RefreshMainWindowMenuToolBarCommand/&gt;</span>
''' &lt;/VFC:MacroCommand.Commands&gt;
</Code>

Output in HelpFile:
<VFC:MacroCommand.Commands>
             <!--<VFC:SetPropertyCommand PropertyName="IncludeXaml" PropertyValue="Stammblatt" TargetElementName="PatientDossier_pnl_Content" />-->
             <VFC:SetPropertyOnTabItemCommand PropertyName="IsChecked" PropertyValue="True" TargetElementName="PatientDossierDisplayContent_rb_Stammblatt" />
             <VFC:SetPropertyCommand PropertyName="IncludeXaml" PropertyValue="NavigationKontextStammblatt" TargetElementName="NavigationPatientDossierKontext_pnl_Include" />
             <span style="background-color:lightgreen; color:red"><VFC:RefreshMainWindowMenuToolBarCommand/></span>
           </VFC:MacroCommand.Commands>
Horst Klein  Thursday, October 15, 2009 4:30 PM
SHFB colorizes the content of <code> elements.  In the absence of a "lang" attribute, it defaults to colorizing the code block as C# or the language you choose in the component configuration.  If you want to apply your own coloring using HTML tags, add a lang="none" attribute to the <code> tag so that it passes the content through as-is.  If you'd prefer all code elements with no language attribute to be uncolorized, you can make it so by setting the default language to None in the Code Block Component configuration via the project's ComponentConfigurations project property.

Eric
  • Proposed As Answer byEWoodruff Thursday, October 15, 2009 7:28 PM
  • Marked As Answer byHorst Klein Friday, October 16, 2009 6:22 AM
  •  
EWoodruff  Thursday, October 15, 2009 7:27 PM
SHFB colorizes the content of <code> elements.  In the absence of a "lang" attribute, it defaults to colorizing the code block as C# or the language you choose in the component configuration.  If you want to apply your own coloring using HTML tags, add a lang="none" attribute to the <code> tag so that it passes the content through as-is.  If you'd prefer all code elements with no language attribute to be uncolorized, you can make it so by setting the default language to None in the Code Block Component configuration via the project's ComponentConfigurations project property.

Eric
  • Proposed As Answer byEWoodruff Thursday, October 15, 2009 7:28 PM
  • Marked As Answer byHorst Klein Friday, October 16, 2009 6:22 AM
  •  
EWoodruff  Thursday, October 15, 2009 7:27 PM
SHFB colorizes the content of <code> elements.  In the absence of a "lang" attribute, it defaults to colorizing the code block as C# or the language you choose in the component configuration.  If you want to apply your own coloring using HTML tags, add a lang="none" attribute to the <code> tag so that it passes the content through as-is.  If you'd prefer all code elements with no language attribute to be uncolorized, you can make it so by setting the default language to None in the Code Block Component configuration via the project's ComponentConfigurations project property.

Eric

Hi Eric
Thanks for the swift answer, now it works!

By the way: We write Xaml code-fragements in out docs.
I tryed <Code lang = "xaml">
But it looks like Xaml-Code is not supported now. Do you know when xaml will be supported?

Horst
Horst Klein  Friday, October 16, 2009 6:25 AM
Support for XAML as a language option has been there since v1.7.0.0 so it should work. If you can e-mail me an example that doesn't, I'll look into it.

Eric
EWoodruff  16 hours 28 minutes ago

You can use google to search for other answers

Custom Search

More Threads

• Local msdn
• Generating a chm help file from Javascript source code comments
• VSE C# is really slow and unstable
• VmWare + VS 2003
• SandCastle CTP June 2007 - Unvalid ReferenceLink
• how to tell Local Help to search Local MSDN?
• [help]detect the status of iis server
• Visual Studio Solution Explorer: Solution Files
• Is there a way to generate index file (hhk) for the html help system automatically?
• VS - parameter