其他分享
首页 > 其他分享> > Propn Code Snippet

Propn Code Snippet

作者:互联网

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>propn</Title>
			<Shortcut>propn</Shortcut>
			<Description>Declare notified field for WPF</Description>
			<Author>Microsoft Corporation</Author>
			<SnippetTypes>
				<SnippetType>Expansion</SnippetType>

			</SnippetTypes>

		</Header>
		<Snippet>
			<Declarations>
				<Literal>
					<ID>type</ID>
					<ToolTip>Field type</ToolTip>
					<Default>int</Default>

				</Literal>
				<Literal>
					<ID>property</ID>
					<ToolTip>filed name</ToolTip>
					<Default>MyProperty</Default>

				</Literal>
				<Literal>
					<ID>field</ID>
					<ToolTip>Field val</ToolTip>
					<Default>myVar</Default>

				</Literal>

			</Declarations>
			<Code Language="csharp">
				<![CDATA[private $type$ $field$;

    public $type$ $property$
    {
        get { return $field$;}
        set
        {
            $field$ = value;
            RaisePropertyChanged(nameof($property$));
        }
    }
    $end$]]>

			</Code>

		</Snippet>

	</CodeSnippet>

</CodeSnippets>

标签:Code,field,Propn,Microsoft,Snippet,Field,type,propn
来源: https://www.cnblogs.com/jeremywucnblog/p/16034256.html