I’m trying to create a Properties form for selected items from my small file explorer[ListView]
[like in Windows when you right click on some selected files/folders and choose Properties.]
the form shows Name,Location,Type,Size and Attributes
It’s a [WCF service] server client application, so i get the attributes from the server from a method called Multi that starts in its own thread.
The question is : How do i set CheckState.Indeterminate if the multiple files that have different attributes values for [Hidden] and [Readonly].

WCF_Client.FM_ServiceReference.FileManagerClient client;
private void Form_MultiProp_Load(object sender, EventArgs e)
{
Thread th = new Thread(Multi);
th.Start();
}
private void GetAttributes(FileAttributes fAttributes)
{
this.Invoke((MethodInvoker)delegate
{
if (fAttributes != 0)
{
if ((fAttributes & FileAttributes.Hidden) == FileAttributes.Hidden)
Hidden.Checked = true;
if ((fAttributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
ReadOnly.Checked = true;
}
});
}
public void Multi()
{
foreach (Item item in itemCollection)
{
GetAttributes(client.GetAttributeOfPath(item.Path));
}
}
I’ve added all attributes in a list, then called Checking method that determines what CheckState should be in ReadonlyCheckBox and HiddenCheckBox, Checking method checks if
prev attribute == next attributeto set the CheckState.