0
C# 및 Windows 8 응용 프로그램부터 시작합니다. 대답은 아주 간단해야하지만 그렇게 할 수는 없습니다.MVVM의 Windows store 앱에서 인수를 전송하는 방법은 무엇입니까?
MVVM Light Model에서 작업합니다.
는 page1.xaml.cs에 내 코드가있다 :
private void ResultsGridView_OnItemClick(object sender, ItemClickEventArgs e)
{
this.Frame.Navigate(typeof(MainPage), "test");
}
하지만 난 example에서처럼 내 함수를 재정의 할 수 없습니다
protected override void OnNavigatedTo(NavigationEventArgs e)
{
string name = e.Parameter as string;
if (!string.IsNullOrWhiteSpace(name))
{
tb1.Text = "Hello, " + name;
}
}
내 MainViewModel.cs에이기 때문에, 내 MainPage.xaml.cs 파일이 아닙니다.
그래서이 두 프레임 사이에 인수를 전송하는 방법을 알고 있습니까?
도움을 주셔서 감사합니다.