The WPF and Silverlight frameworks provide custom controls and user controls as a mechanism for re-using blocks of UI elements.
Custom controls are rather special, with the logic being de-coupled from the XAML in order to support templating.
If you create a binding in XAML but do not specify the source (which is probably the most common use case), the source will be set to the , so their bindings work also: Finally, we're done!
If the technique of binding the layout root of the user control to itself is a bit confusing - the following diagram, which shows the visual tree of our simple application, might help: Again, notice that the (but that would just be showing off! Hopefully this blog post will help anyone who is confused about how to create user controls which expose properties in WPF or Silverlight.
For a number of years I worked with the Microsoft stack of technologies, including WPF, WCF, Silverlight and Windows Phone.