Great example of an attached behavior
From Dave Relyea's blog, Pixel Snapping in Silverlight as an attached behavior:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
From Dave Relyea's blog, Pixel Snapping in Silverlight as an attached behavior: