我有一個與一個國家相關的匹配列表。現在,在迭代我給你這個國家的每一場比賽,因此,例如:如何防止ItemCount出現重複?
Team A = Italy
Team B = Italy
我結合這個在這樣的GridView控件相匹配:
<Expander IsExpanded="True" Background="#4F4F4F">
<Expander.Header>
<StackPanel Orientation="Horizontal" Height="22">
<TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="White" FontSize="22" VerticalAlignment="Bottom" />
<TextBlock Text="{Binding ItemCount}" FontSize="22" Foreground="Orange" FontWeight="Bold" FontStyle="Italic" Margin="10,0,0,0" VerticalAlignment="Bottom" />
<TextBlock Text=" match" FontSize="22" Foreground="White" FontStyle="Italic" VerticalAlignment="Bottom" />
</StackPanel>
</Expander.Header>
<ItemsPresenter />
</Expander>
name是國家的名字,反正問題是ItemCount搶了兩次意大利。我需要在xaml中防止這種情況,並且不顯示重複的項目,這可能嗎?
您沒有提供足夠的細節。我需要成爲諾查丹瑪斯才能回答 – Liero
你可以在你設置'ItemCount'的地方發佈代碼嗎? – mariosangiorgio
XAML在這裏看起來大體上不相關......它只顯示您已經計算出的內容。如何填充列表的C#代碼? –