private void Button_Click(object sender, RoutedEventArgs e) { var controls = OscAddress.GetChildrenWithValue(this); this.Vm = new SynthViewModel(controls); this.DataContext = Vm; Vm.Parent = this.Parent as Window; Vm.Initialize(); }