I'm using mvvmlight framework for wpf. I have main window where I put my frame (firstLoadedPage is just an example):
<Frame Source="firstLoadedPage" />
I want to change my page to another one when I click button in
first loaded page
but I have no idea how can I achieve it. I've tried bind property like this to frame source:
public static string _myFrameSourcePath = firstLoadedPage
public string MyFrameSourcePath
{
get { return _myFrameSourcePath; }
set {
_myFrameSourcePath = value;
RaisePropertyChanged("MyFrameSourcePath");
}
}
and then change value of _myFrameSourcePath when I click button in firstLoadedPage. It doesn't work so I tried change MyFrameSourcePath to static and then change value of MyFrameSourcePath instead of _myFrameSourcePath in Page. It also doesn't work.
Can somebody tell me how can I change my page placed in frame source in MainWindow when I click button inside this page to change current page to another?