I have listview. In this listview I have listview.item that contains button. I bind my listview to some datasource, so I have many buttons. How to disable all of this buttons?
http://pastebin.com/6MFDfX9S
I have listview. In this listview I have listview.item that contains button. I bind my listview to some datasource, so I have many buttons. How to disable all of this buttons?
http://pastebin.com/6MFDfX9S
Looking at your code, besides binding to "Title", "Date", "DownloadedOrNot" and "Info" you can add another property and bind that to the IsEnable property of the buttons, like "IsEnable.
If you need to change the value of this property you can always traverse your ListView Items like this:
foreach (var item in listview.Items)
{
(item as your_object).IsEnable = false;
}
If you have lots of buttons.. Use LINQ insted.
listview.Items.All(item =>{(your_obj)item.IsEnable=false; return true});