WPF: Binding to ObservableCollection in ControlTemplate is not updated
问题 I created a ControlTemplate for my custom control MyControl . MyControl derives from System.Windows.Controls.Control and defines the following property public ObservableCollection<MyControl> Children{ get; protected set; } . To display the nested child controls I am using an ItemsControl ( StackPanel ) which is surrounded by a GroupBox . If there are no child controls, I want to hide the GroupBox . Everything works fine on application startup: The group box and child controls are shown if the