views:

261

answers:

0

I have a global style for my WPF listbox and want to customize the GroupStyle. However, this code

<Style x:Key="myListBox" TargetType="ListBox">
  <!-- ... -->
  <Setter Property="GroupStyle">
    <Setter.Value>
      <!-- ... -->
    </Setter.Value>
  </Setter>
</Style>

won't compile, because GroupStyle doesn't have a set accessor.

This issue was discussed in the MSDN forum some time ago, but there was no solution.

Is it really impossible to customize the GroupStyle in a ListBox' style?