创建一个设置ListView的GroupStyle的样式? [英] Creating a Style that sets the GroupStyle of a ListView?

查看:284
本文介绍了创建一个设置ListView的GroupStyle的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个样式,该样式应该设置ListView的GroupStyle.我尝试了以下XAML样式:

I'm trying to create a Style that is supposed to set the GroupStyle of a ListView. I tried the following XAML Style:

代码块

推荐答案

我遇到了完全相同的问题!因此,我只想回答这个棘手的问题.

我想,问题出在某种程度上,这实际上不是您在setter中设置的GroupStyle,而是GroupStyle的一个属性,称为HeaderTemplate.在我的情况下,我使用的是另一个名为ContainerTemplate的属性,但存在相同的错误.

我通过键入以下内容解决了编译器错误:
I have exactly the same problem! And therefore I would just love an answer to this tricky question.

I guess somehow the problem lies in the fact that it actually is not the GroupStyle that you are setting with the setter, but a property of the GroupStyle called HeaderTemplate. In my case I am using a different property called ContainerTemplate but with the same error.

I got around the compiler error by typing:
代码块


这篇关于创建一个设置ListView的GroupStyle的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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