访问WPF DataGrid组头的项目 [英] Accessing items for WPF DataGrid group header

查看:142
本文介绍了访问WPF DataGrid组头的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组集合的WPF DataGrid 中显示的对象。每个组中的所有项目都有两个项目属性相同,我想将它们都放在组头中。我可以显示用于与 Name 绑定分组的属性,但是如何显示另一个?我没有看到任何方式访问分组的项目。

I have a collection of objects that is displayed in a grouped WPF DataGrid. There are two item properties that will be the same for all items in each group, and I want to put both of them in the group header. I can show the property that's used for grouping with the Name binding, but how do I show the other one? I don't see any way to access the grouped items.

推荐答案

使用项目组项目。您可能需要一个价值转换器。

Use Items property of the group item. You will probably need a value converter.

这篇关于访问WPF DataGrid组头的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆