Custom behavior with a group of setters to apply based on a feature flag
Posted: 27 Feb 2024, 18:34
Hi!
I am trying to see if it is possible to create a custom behavior that has a property indicating a feature flag name and a property that is a BaseSetterCollection to apply if the feature flag is enabled. I have overriden OnAttached and check for the state of the feature flag in that function and then if the feature flag is enabled I call the following function:
I'm just not sure of how to write/if it's possible to write ApplySetter so that we apply the setter property to the associated element.
I am trying to see if it is possible to create a custom behavior that has a property indicating a feature flag name and a property that is a BaseSetterCollection to apply if the feature flag is enabled. I have overriden OnAttached and check for the state of the feature flag in that function and then if the feature flag is enabled I call the following function:
Code: Select all
void ApplySetters(Noesis::BaseSetterCollection* setters)
{
for (int i = 0; i < setters->Count(); i++)
{
Noesis::BaseSetter* setter = setters->Get(i);
if (setter)
{
ApplySetter(setter);
}
}
}