重新发布:UserControl(从其他usercontrol更改Listview) [英] REPOST: UserControl (Change Listview from other usercontrol)

查看:163
本文介绍了重新发布:UserControl(从其他usercontrol更改Listview)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我是WPF的新手.我创建了包含ListView和2 Buttons的用户控件.在我的Windows应用程序中,我将使用此用户控件.我的问题是:我想通过XAML从我的窗口设计驻留在Usercontrol中的listview.我想将gridview列添加到Windows应用程序的usercontrol中存在的listview中.请帮我.问候Jegan

Hi All, I am new to WPF. I have created user control which contains ListView and 2 Buttons. In my windows application i will use this user control. My question is : I want to design listview which resides in Usercontrol from my windows through XAML. I want to add gridview columns to the listview which present in usercontrol from windows application. Please help me. Regards Jegan

这是此上一个的转发.

推荐答案

对不起,另一个问题 我可以这样设置listview(LstView)的属性.我尝试使用依赖项属性,但无法设置... 公共双ListHeight { 得到 { 返回lstView.Height; } 放 { lstView.Height =值; } } 公共双精度ListWidth { 得到 { 返回lstView.Width; } 放 { lstView.Width =值; } } 以下是我尝试在列表视图中添加列的相同方法.但是我无法... 公共GridViewColumn ListColumn { 放 { ((GridView)lstView.View).Columns.Add(值); } } 再次对不起,您没有更新之前的问题.我只是WPF的新手.
Sorry for the another question I am able to set the property of listview(LstView) by like this. I have tried to use dependency property but I am not able set... public double ListHeight { get { return lstView.Height; } set { lstView.Height = value; } } public double ListWidth { get { return lstView.Width; } set { lstView.Width = value; } } Same way below I have tried to add columns in the list view.. but i am not able to... public GridViewColumn ListColumn { set { ((GridView)lstView.View).Columns.Add(value); } } sorry again for not updating the earlier question. I am just new to WPF.


回答了这个问题

上次您得到了答案,为什么不根据给出的答案说出尝试的内容,为什么他们没有帮助吗?为什么要发布一个新问题,而不仅仅是编辑旧问题?

You got an answer last time, why do you not say what you tried based on the answers you were given and why they did not help ? Why post a new question at all and not just edit the old one ?


这篇关于重新发布:UserControl(从其他usercontrol更改Listview)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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