vendredi 28 octobre 2016

WPF c# CheckBox Combobox background color + disable

I have a combobox which has checkboxes as items.

I´m trying to disable as well as change the background color of some checkboxes.

I´m doing so:

foreach (System.Windows.Controls.CheckBox item in cmbMnMe.Items)
{
    item.IsEnabled = false;
    item.Background = new SolidColorBrush(Color.FromRgb(102, 153, 255));
}

But it still enabled to check as well as the background color didn´t change.




Aucun commentaire:

Enregistrer un commentaire