One somewhat obscure feature of XamlPad is the ability to insert snippets in the text editor area. Right-clicking on this area shows a number of items you can insert, such as "Comment Selection" or "Multiline TextBox" (note that "Animated Background" accidentaly shipped using old syntax for animations which is no longer valid).
You can also create your own snippets by clicking on the "Edit Snippets" item in the context menu. You can define a name for the snippet and the text to insert. In the body, you can use a pipe character "|" to represent the current selection - see the body for "Comment Selection" for an example. You can use the character multiple times in the body, and each time it will be replaced by the selection.
This posting is provided "AS IS" with no warranties, and confers no rights.