I'm building a WPF UI for configuring some complex business rules; each rule can have many conditions, so I figured I would include a drop-down list of logical operators so that the user could have the flexibility required by the business case.
Basically a rule has a logic and a behavior, and under each rule, each condition also has a logic:
Rules' behavior is one of the following:
RuleConditionsMustPass: this means a rule is said to pass when the logical operations of all conditions under it evaluate to
RuleConditionsMustFail: this means a rule is said to pass when the logical operations of all conditions under it evaluate to
Rules' logic can be one of the following:
And: all rules with an "And" logic must pass.
Or: among all rules with an "Or" logic, at least one must pass.
Xor: among all rules with an "Xor" logic, only one must pass.
Similarly, conditions' logic works the same way: given a "RuleConditionsMustPass" behavior, the rule will pass if all "And" conditions pass and if among all "Or" conditions at least one passes and among all "Xor" conditions only one passes.
What I'm wondering, is whether the icons I've chosen for each logical operator make any sense from a UX point of view, and if using a TreeView for this rule configuration feature is the best approach:
Clicking the green "+" button here would add a condition under that rule; clicking the red "-" button would delete that rule. I realize the ComboBox.ItemTemplate is a bit off here, when I'm done with it I'll make sure all items in the dropdown have the same width, and I won't be using the enum names in the directly in the UI.