You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SplitButton extents ItemsCollection, which allows me to specify a GroupStyle (useful in configurations where I want to supply a set of standard static colors and a set of theme colors).
The "PART_ListBox" needs to bind the "GroupStyle" collection in SplitButton to the ListBox.GroupStyle collection. The short term work around was to subclass the SplitButton and override the OnApplyTemplate() call.
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
// Can't use the EnforceType<ListBox> method in the base class because it's private.
ListBox listBox = GetTemplateChild("PART_ListBox") as ListBox;
if(listBox == null) { return; }
foreach(GroupStyle style in GroupStyle)
{
listBox.GroupStyle.Add(style);
}
}
The text was updated successfully, but these errors were encountered:
SplitButton extents ItemsCollection, which allows me to specify a GroupStyle (useful in configurations where I want to supply a set of standard static colors and a set of theme colors).
The "PART_ListBox" needs to bind the "GroupStyle" collection in SplitButton to the ListBox.GroupStyle collection. The short term work around was to subclass the SplitButton and override the OnApplyTemplate() call.
The text was updated successfully, but these errors were encountered: