Does anyone know how one can data bind enum field which is a combination of ORed base enum?
Say I have
MyEnumType
{
e1=0x1,
e2=0x2,
e3=0x4
}
and then I do
MyEnumType myEnum = MyEnumType.e1 | MyEnumType.e3
Then I would like to display a dialog box which can be used to set value of myEnum.
Right now I have a bunch of checkboxes each of which corresponds to a different value in enum type.
Depending on what is checked I cycle through them and so on. No data binding done, all is manual.
Google for
FlaggedEnumEditor. It will be a good enough example to understand the concept.