Quick Timesaver When Coding Xaml

Try this in your Xaml…

<Button
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="5"
Height="30" />


If Intellisense is doing its job, your actual key-strokes were

<Bu  <tab>
ve <tab> c <tab>
ho <tab> c <tab>
ma <tab> 5 <hunt for right arrow, hit arrow, fingers back on keyboard>
he <tab> 30 <repeat hunt for right arrow>

I get why Intellisense can’t figure out when to move me to the right of the double quotes for the margin and the height, but I hate looking for the right arrow.KeyboardMapping

Today, with a little help from a friend, I fixed that by opening Tools->Options->Environment

->Keyboard and entering the letters lineend into the search box.

Click on Edit.LineEnd, type Control-semicolon into the Shortcut keys entry box, and press the button Assign.

Presto! control-semicolon is now a synonym for “go to the end of the line” and I’ve cut the time it takes to fill in values in Xaml significantly.

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen Pluralsight & LinkedIn Learning courses. He was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Xamarin Certified Mobile Developer and a Xamarin MVP and a Microsoft MVP.
This entry was posted in Essentials, Patterns & Skills and tagged . Bookmark the permalink.

7 Responses to Quick Timesaver When Coding Xaml

Comments are closed.