Characteristics of a binding command.
false: The normal process (check custom attribute -> check bindable -> command.build()) should take place.true: The binding command wants to take over the processing of an attribute. The template compiler keeps the attribute as is in compilation, instead of executing the normal process.
The
on-flagbinding command.Example
This command can be used as follows:
This will create a two-way binding between the
booleanPropproperty ofsome-elementand thesourcePropertyin the binding context. Thesome-flagis used to specify the flag that should be checked for in the source property. If thesourceProperty(a comma-separated list of flags, for example[Flags]enum from OData) contains thesomeFlagflag, thebooleanPropwill be set totrue, otherwise it will be set tofalse.The
someFlagflag can be toggled by changing thebooleanPropproperty. That is, if thebooleanPropis set totrue, thesomeFlagwill be added to thesourceProperty, otherwise it will be removed.Note that the flags value are converted to PascalCase, we want to primarily work with PascalCased enums from OData.