Does the .NET framework have any attached properties or attached behaviors built into it?
-
21-03-2021 - |
Question
I'm basically curious if any Microsoft code (.NET Framework) has any files that show attached properties and attached behaviors. I'm aware of numerous examples out there on the internet, but I'm more curious about seeing how Microsoft codes it.
Solution
Microsoft uses attached properties. Specifically Grid
s. You assign a control's row and column in a grid through attached properties. The MSDN documentation on Attached Properties also mentions DockPanel
s:
OTHER TIPS
In the Expression Blend SDK there are several behaviors.
I would dump this with reflector and look through the code. It's been highly informative for me trying to implement my own mouse drag behavior.
http://msdn.microsoft.com/en-us/library/ff723971%28v=expression.40%29.aspx
I have looked through MouseDragElementBehavior for instance.