XAML Zugriff CollectionViewSource GroupDescriptions

LosLegator

Grünschnabel
Hallo,

ich habe folgenden Problem

Ich habe eine normale CollectionViewSource

Code:
        <CollectionViewSource x:Key="AnträgeInBearbeitungGroups" Source="{Binding Path=AllAnträge}">
            <CollectionViewSource.GroupDescriptions>
                <PropertyGroupDescription PropertyName="UserPLZ" />
            </CollectionViewSource.GroupDescriptions>
            <CollectionViewSource.SortDescriptions>
                <!-- Sort descending by IsReturn so that the 'True' values appear first. -->
                <scm:SortDescription PropertyName="UserPLZ" Direction="Ascending"/>
                <scm:SortDescription PropertyName="AntragId" Direction="Ascending" />
            </CollectionViewSource.SortDescriptions>
        </CollectionViewSource>

Jetzt werden sie auch ganz normal gegroupt und angezeigt.

Jetzt möchte ich aber, das in den Group Überschriften

Code:
<GroupStyle x:Key="CustomerGroupStyle">
            <GroupStyle.HeaderTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock x:Name="txt1" Visibility="Visible" FontWeight="Bold" Foreground="White" Margin="1" Padding="4,2,0,2" Text="HIER SOLL ES STEHEN" Background="{StaticResource Brush_HeaderBackground}"/>
                    </StackPanel>
                </DataTemplate>
            </GroupStyle.HeaderTemplate>
        </GroupStyle>

Soll der Wert stehen, nach dem gegroupt worden ist.

Wie referenziere ich auf diesen Wer.

Ich hoffe jemand kann mir da weiter helfen.

MFG
 
Zurück