Is it possible to create an own conditional format rule, where the value is beeing checked against a custom binding?
Eg.
<ig:TemplateColumn.ConditionalFormatCollection> <MY:CustomFormatRule Value="false" Match="{Binding Path=IsEnabled}" StyleToApply="{StaticResource SomeResource}" /></ig:TemplateColumn.ConditionalFormatCollectio>
How can I achieve this?
I am not sure what you are asking. If you are making your own rule, you have the data object that is being used for that row in the rule. So any properties could be used directly and not via any sort of binding.
Could you explain a little more?
Hi Darrell
Thanks for your reply.
I need a ConditionalFormatter that doesn't check the Value property against the bound cell-value, but against a different value within the model.
My ViewModel looks something like this
vm.cellvalue1 = 1;vm.cellvalue2 = 2;
vm.cellenabled1 = true;vm.cellenabled2 = false;
My goal is to apply a style to the cells 'cellvalueX' if 'cellenabledX' is set to true. So in the case above the style should be applied to 'cellvalue1', because 'cellenabled1' is true.
The values in vm.cellenabledX aren't bound to the grid.
Is that clear enough?
If you make a custom rule you have access to the data object that the row is bound to. From what you are describing the data object has the information, so you should be able make a custom rule.
Hey Darrell
I was on the right path but you closed the missing gaps.
Great!
Attaching a sample showing a custom rule, looking at a field not bound to the column that the rule is on