/vscode-xaml-snippets

Visual Studio Code XAML Snippets

The UnlicenseUnlicense

vscode-xaml-snippets

Visual Studio Code WPF XAML Snippets.

Installation procedure

  1. Open the xaml file in VSCode.
  2. Select Manage - User Snippets. step1
  3. Select xml. step2
  4. Rewrite the contents of xml.json. step3

List of snippets

Shortcut Description
btn Button
btn# Button with name
check CheckBox
check# CheckBox with name
radio RadioButton
radio# RadioButton with name
lbl Label
tblk TextBlock
tbx TextBox
tbx# TextBox with name
lbl+tbx Label and TextBox
tblk+tbx TextBlock and TextBox
list ListBox
list# ListBox with name
list>li ListBox containing ListBoxItem
combo ComboBox
combo# ComboBox with name
combo>ci ComboBox containing ComboBoxItem
border Border
rect Rectangle
img Image
grid Grid
stack StackPanel
stackh Horizontal StackPanel
wrap WrapPanel
dock DockPanel
rd Grid Row Definition
rds Grid Row Definitions
cd Grid Column Definition
cds Grid Column Definitions
stack>btn*3 StackPanel containing 3 Buttons
stackh>btn*3 Horizontal StackPanel containing 3 Buttons
rds>rd*2 2 rows Grid
rds>rd*3 3 rows Grid
cds>cd*2 2 columns Grid
cds>cd*3 3 columns Grid
style Style
style# Style with key
winres Window Resources
pgres Page Resources
ucres UserControl Resources
set Setter
#region #region
ddc d:DataContext
menu Menu
menu>mi Menu containing MenuItem
cmenu ContextMenu
cmenu>mi ContextMenu containing MenuItem

Reference link

For Visual Studio 2019 here.