0
ウィンドウにbutton UpdatePatient
のボタンがありますMainMenuWindow
。私がボタンにしたいのは、PatientMainWindow
とグリッドをPatientMainWindow
に表示し、ラベルの内容をに変更することです。前のウィンドウのボタンに基づいてグリッドを表示する方法WPFをクリックします。C#
private void button_updatePatient_Click(object sender, RoutedEventArgs e)
{
gridHidden_True();
PatientMainWindow patientMainWindow = new PatientMainWindow();
patientMainWindow.ShowDialog();
patientMainWindow.Grid_SelectPatient.Visibility = Visibility.Visible;
patientMainWindow.label_PatientWindowType.Content = "Update Patient";
this.Close();
}
gridHidden_True()
現在のウィンドウ上のグリッドを隠し、私が持っているだけの方法です。
新しいウィンドウが表示されると、ラベルの内容は変更されず、グリッドは表示に設定されません。
ありがとう、私はそれを見ていないと信じています。今すぐうまくいく –