February 2012
Intermediate to advanced
708 pages
22h 55m
English
Just like code, often you want to add comments to your XAML to describe what it's for, and also comment out bits of XAML without having to delete it from the file. Let's look at some strategies for using comments in XAML.
You can use the standard XML tags, which are incidentally the same as HTML's, for inserting comments into your XAML. Begin the comment with <!--, and end it with -->, for example:
<!-- A XAML comment -->
At times, you might also want to comment out some XAML (instead of deleting it), for example:
<!-- <TextBlock Text="{Binding Name}" /> -->
Note As a shortcut, use the key chord ...
Read now
Unlock full access