Can not access Class from xaml

Apr 3, 2014 at 12:12 PM
Edited Apr 3, 2014 at 2:34 PM
Hi i am using Modern UI and Its loading ".xaml" file by ContentSource and link parameter. So I am stuck with the .xaml Class Object. How could we get the Class Object reference by Content Source or say URI.

My Main class file code is as below
 public partial class MainWindow : ModernWindow
     public MainWindow()
         this.ContentSource = new Uri("Pages/Home.xaml", UriKind.Relative);
I just want Home.xaml object as Home Class Object. I tried to create a new Home Object as
Home homPage = new Home();
But its creating a new Home class Object not that one, which is used in Cotent Source.

So please help me to get this object.

Even I also tried
homePage = (Home)this.Content;
but getting error of "Exception has been thrown by the target of an invocation.". So please help to get the Class Object i.e. Home class Object.