<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
	<CodeSnippet Format="1.0.0">
		<Header>
			<Title>加入 DependencyProperty 登錄</Title>
			<Author>Microsoft Corporation</Author>
			<Description>加入要登錄讀寫的 DependencyProperty 的程式碼，而且必須將此程式碼片段加入衍生自 DependencyObject 的類別。</Description>
			<Shortcut>wpfdp</Shortcut>
			<SnippetTypes>
				<SnippetType>Expansion</SnippetType>
			</SnippetTypes>
		</Header>
		<Snippet>
			<Declarations>
				<Literal>
					<ID>propertyType</ID>
					<ToolTip>取代為屬性的類型。</ToolTip>
					<Default>string</Default>
				</Literal>
				<Literal>
					<ID>propertyName</ID>
					<ToolTip>取代為屬性的名稱。</ToolTip>
					<Default>Prop1</Default>
				</Literal>
         <Object>
          <ID>ownertype</ID>
          <Type>Control</Type>
          <ToolTip>取代為正在其中加入此程式碼片段之類別的名稱。</ToolTip>
          <Default>Window1</Default>
        </Object>
				<Literal>
					<ID>defaultValue</ID>
					<ToolTip>取代為屬性的預設值。</ToolTip>
					<Default>Nothing</Default>
				</Literal>
			</Declarations>
			<Code Language="VB">
				<![CDATA[
          Public Property $propertyName$ As $propertyType$
              Get
                Return GetValue($propertyName$Property)
              End Get
              
              Set(ByVal value As $propertyType$)
                  SetValue($propertyName$Property, value)
              End Set
          End Property

          Public Shared ReadOnly $propertyName$Property As DependencyProperty = _
                                 DependencyProperty.Register("$propertyName$", _
                                 GetType($propertyType$), GetType($ownerType$), _
                                 New PropertyMetadata($defaultValue$))
          ]]>
			</Code>
		</Snippet>
	</CodeSnippet>
</CodeSnippets>
