| Server IP : 180.180.241.3 / Your IP : 216.73.216.216 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Program Files (x86)/Microsoft Visual Studio 10.0/VB/Snippets/1033/WPF/ |
Upload File : |
<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Add a DependencyProperty Registration</Title>
<Author>Microsoft Corporation</Author>
<Description>Adds code to register a read-write DependencyProperty. This snippet must be added to a class that derives from DependencyObject.</Description>
<Shortcut>wpfdp</Shortcut>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<References>
<Reference>
<Assembly>WindowsBase</Assembly>
</Reference>
<Reference>
<Assembly>PresentationCore</Assembly>
</Reference>
<Reference>
<Assembly>PresentationFramework</Assembly>
</Reference>
</References>
<Imports>
<Import>
<Namespace>System.Windows</Namespace>
</Import>
</Imports>
<Declarations>
<Literal>
<ID>propertyType</ID>
<ToolTip>Replace with the type of the property.</ToolTip>
<Default>string</Default>
</Literal>
<Literal>
<ID>propertyName</ID>
<ToolTip>Replace with the name of the property.</ToolTip>
<Default>Prop1</Default>
</Literal>
<Object>
<ID>ownertype</ID>
<Type>Control</Type>
<ToolTip>Replace with the name of the class this snippet is being added to.</ToolTip>
<Default>Window1</Default>
</Object>
<Literal>
<ID>defaultValue</ID>
<ToolTip>Replace with the default value of the property.</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 FrameworkPropertyMetadata($defaultValue$))
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>