Visual Studio Code WPF XAML Snippets.
- Open the xaml file in VSCode.
- Select
Manage-User Snippets.
- Select
xml.
- Rewrite the contents of
xml.json.
| 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 |