static void SetupItemsControl(PropertyItemsControl itemsControl) { itemsControl.TryFindParent <Grid>().Background = (SolidColorBrush)Application.Current.FindResource("SixMediumGray"); itemsControl.GroupStyle.First().ContainerStyle = (Style)Application.Current.FindResource("XctkGroupItemStyle"); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); PropertyItemsControl propertyItemsControl = Template.FindName("PART_PropertyItemsControl", this) as PropertyItemsControl; propertyItemsControl.GroupStyle.Clear(); propertyItemsControl.GroupStyle.Add(GroupStyle); }