TextBoxes や ComboBoxes などのいくつかの入力コントロールを含む WPF に ContentControl があります。これらの各コントロールは、ViewModel の特定のプロパティにデータバインドされていUpdateSourceTrigger=Explicitます。
FormularioPaciente「送信」ボタンをクリックすると、バインディングを持つすべての子をトラバースし、次のように呼び出しUpdateSourceます。
private void btnSalvarEditarPaciente_Click(object sender, System.Windows.RoutedEventArgs e) {
foreach (var childControl in LogicalTreeHelper.GetChildren(FormularioPaciente)) {
// what should I do now?
// I would really like to "auto-find" everything that should be updated...
}
}