Skip to content

Commit 46e0170

Browse files
authored
Merge pull request #1282 from dotnet/publish-4339
2 parents 055a391 + 5a0e087 commit 46e0170

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dotnet-desktop-guide/framework/wpf/advanced/attached-properties-overview.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ In XAML, you set attached properties by using the syntax *AttachedPropertyProvid
2828

2929
The following is an example of how you can set <xref:System.Windows.Controls.DockPanel.Dock%2A?displayProperty=nameWithType> in XAML:
3030

31-
[!code-xaml[PropertiesOvwSupport#APBasicUsage](~/samples/snippets/csharp/VS_Snippets_Wpf/PropertiesOvwSupport/CSharp/page4.xaml#apbasicusage)]
31+
```xaml
32+
<DockPanel>
33+
<TextBox DockPanel.Dock="Top">Enter text</TextBox>
34+
</DockPanel>
35+
```
3236

3337
The usage is somewhat similar to a static property; you always reference the type <xref:System.Windows.Controls.DockPanel> that owns and registers the attached property, rather than referring to any instance specified by name.
3438

0 commit comments

Comments
 (0)