我有一个与一个国家相关的匹配列表。现在,在迭代我给你这个国家的每一场比赛,因此,例如:如何防止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#代码? –