I had a request from a reader as to how they could post sample code in response to an article I had written. I thought this was an excellent question and it can be hard to find the right answer when all you want to do is post your question.
The following is a quick example of posting a code snippet for XAML which is actually XML. If you want to submit XAML in a post or comment then you must wrap it with the following tag:
It will then look like this once rendered:
<TextBox Text="Hello World" />
There are many other language targets. I use these common ones:
Refer to this link for other targets as well.
Hope that helps….