What's the best way to insert macros, snippets, or code blocks into a XAML view?

I would like to make a time-saving snippet that appears in XAML blocks like this and then just change the values ​​(for example you can in code like "cw" -TAB or "foreach" -TAB ):

<Style x:Key="FirstCellStyle" TargetType="{x:Type Border}">
    <Setter Property="BorderBrush" Value="Red"/>
    <Setter Property="MinWidth" Value="50"/>
</Style>

      

But snippets don't seem to work in the XAML view .

I am currently using Texter to insert snippets that work anywhere on Windows, but Visual Studio code gets tricky when text is pasted into a XAML view.

What are some of the solutions you are using to speed up verbose XAML coding eg. inserting macros, snippets, code snippets, etc.

+1


a source to share


1 answer


I get snippets to work in XAML, but they work in the typical XML way, that is, you must type parentheses around the snippet name.



Not as good as the Intellisense code, but it works fine. Never tried Texter which might work better ...

0


a source







All Articles