Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snippets to the VSIX package #25

Open
mauroservienti opened this issue Jun 1, 2015 · 3 comments
Open

Add snippets to the VSIX package #25

mauroservienti opened this issue Jun 1, 2015 · 3 comments

Comments

@mauroservienti
Copy link
Member

http://madskristensen.net/post/shipping-visual-studio-snippets-in-an-extension

@mauroservienti
Copy link
Member Author

the first one:

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>Radical Property</Title>
      <Author>The Radical Team</Author>
      <Description>Creates a Radical Property</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>rp</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal Editable="true">
          <ID>propertyType</ID>
          <ToolTip>The property type</ToolTip>
          <Default>object</Default>
          <Function>
          </Function>
        </Literal>
        <Literal Editable="true">
          <ID>propertyName</ID>
          <ToolTip>The property name</ToolTip>
          <Default>MyProperty</Default>
          <Function>
          </Function>
        </Literal>
      </Declarations>
      <Code Language="csharp" Delimiter="$"><![CDATA[public $propertyType$ $propertyName$
{
    get { return this.GetPropertyValue( () => this.$propertyName$ ); }
    set { this.SetPropertyValue( () => this.$propertyName$, value ); }
}]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

@micdenny
Copy link
Member

micdenny commented Jun 1, 2015

excellent 😄

@micdenny
Copy link
Member

now we can use CodeSnippetStudio by Alessandro, made in italy ❤️ 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants