I have situation where i disable or enable UI elements on checking or unchecking by calling a function ManageDisablity(ParentClass,value,cbox) like this:
cbox.Checked = (o, e) =>
{
manageDisable(parentClass,0, cbox);
};
chb.Unchecked = (o, e) =>
{
manageDisable(parentClass,1, cbox);
};
It works fine.It disables and enables well the UIElements to be disabled or enabled.
Why it do not work and how to make it work?
CodePudding user response:
Try The Following :
When Creating :
childGrid.Loaded = DoYourThing;
in DoYourThing :
DoYourThing()
{
foreach(var chb in comboboxs)
{
if (param.Component.Attributes[0].Value == 1)
chb.IsChecked = true;
}
childGrid.Loaded -= DoYourThing;
}