私のWPFアプリケーションの最初のヘッダの(背景)の色を変更し、私はこのリストビューを持っている: - のみ最初 - ヘッダーC#/ XAML - ListViewのグループ化:のみ
<ListView.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Expander IsExpanded="True">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" FontWeight="Bold"
Foreground="Gray" FontSize="22"
VerticalAlignment="Bottom"/>
<TextBlock Text="{Binding ItemCount}" FontSize="22"
Foreground="Green" FontWeight="Bold"
FontStyle="Italic" Margin="10,0,0,0"
VerticalAlignment="Bottom" />
<TextBlock Text=" Ergebnis(se)" FontSize="22"
Foreground="Silver" FontStyle="Italic"
VerticalAlignment="Bottom"/>
</StackPanel>
</Expander.Header>
<ItemsPresenter/>
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</ListView.GroupStyle>
は今、私が最初にしたいですそれ以外の色(ヘッダーの他の部分(フォント色または背景色、私は気にしません)にマーキングするために表示されます。 私はそれを行う方法についてのアイデアが浮かんできていません。
あなたはすでに異なる色のヘッダー内にテキストを表示していますが、ここで何を達成したいですか?ヘッダーの背景をカラーにしたいですか? –
いいえ最初のヘッダーのみを他のヘッダーとは異なる色で表示します。 – murkr
「ヘッダー」とはどういう意味ですか?最初のエクスパンダーの背景を変更したいですか? – mm8