private void OnGroupChecked(object sender, RoutedEventArgs e) { chartGroup = new Grid() { HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch }; }