Page reuse in Silverlight

Suppose many Silverlight applications need a function encapsulated by a page (e.g. Feedback.xaml), this page should be created only once, and used everywhere according to DRY (Don't Repeat Yourself) principle. The reuse of a page is very straightforward as following:

  1. Create a User Control page in a Silverlight class library project which usually already exists to contain reusable functions.  This may not sound intuitive.
  2. Add the class library project to the references of the project where this page will be used.
  3. Add the name space of the class library to the page where the reusable page (or control) will be used (e.g. add xmlns:MyClassLibrary="clr-namespace:MyClassLibrary;assembly=MyClassLibrary" ).
  4. Use the reusable control just like using other controls (e.g. <MyClassLibrary:Feedback/>