http://geekswithblogs.net/lbugnion/archive/2007/03/02/107747.aspx[
^]
Above outlines how to use a derived class instead of the standard Window or Page classes in the XAML. Essentially the XAML element must specify the local base class including its namespace qualifier. e.g.:
<local:Shape x:Class="Triangle.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:<your namespace here>"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Shape>