我怎样才能改变第一列表视图元素的透明度? [英] How can I change opacity of first listview element?

查看:150
本文介绍了我怎样才能改变第一列表视图元素的透明度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试改变第一的ListView元素的不透明度,
 但我没有得到到implemet它的正确方法;
 能否请您给一些建议?

im trying to change opacity of first ListView element, but i am not getting the right way to implemet it ; Can you please give some suggestions ?

display.Opacity = 0.5;
                foreach (Common trigger in display.Items)
                {
                    if (trigger.Image_Name == "First")
                    {
                        trigger.Opacity = 1;
                    }
                }

在这里显示的是我的ListView

where display is my ListView

推荐答案

当你改变的ListView的不透明性属性不会影响到它的项目分开(对于ListView的不透明性的变化作为一个整体)。如果你想设置的所有项目的不透明度为0.5除一人外,尝试做这样的事情。

When you change the opacity property of ListView it does not affect to it's items separately(opacity changes for ListView as a whole). If you want to set all items opacity to 0.5 except one, try to do something like this

for(int i=1; i<display.Items.Count;i++)
  display.Items[i].Opacity = 0.5;

这篇关于我怎样才能改变第一列表视图元素的透明度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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