string usrname; // 当前用户的用户名 public UserMainWin(string name) { InitializeComponent(); usrname = name; PageFolder.UserInfo uinfo = new PageFolder.UserInfo(usrname); this.frame.Navigate(uinfo); }
// 显示用户信息 private void userinfo_Click(object sender, RoutedEventArgs e) { //this.frame.Source = new Uri("/PageFolder/UserInfo.xaml", UriKind.Relative); PageFolder.UserInfo uinfo = new PageFolder.UserInfo(usrname); this.frame.Navigate(uinfo); }