public override Style EvaluateCondition(object item)
        {
            var comparisoncompPropReflection = new FastReflectionHelper()
            {
                PropertyName = this.ValueMemberPath
            };
            object comparisonPropValue = comparisoncompPropReflection.GetPropertyValue(item);

            var selectionPropReflection = new FastReflectionHelper()
            {
                PropertyName = this.SelectionMemberPath
            };
            object selectionPropValue = selectionPropReflection.GetPropertyValue(item);

            if (this.EvaluateConditionAgainstPropertyValue(comparisonPropValue))
            {
                if (this.EvaluateSelectionAgainstPropertyValue(selectionPropValue))
                {
                    return(this.SelectedStyle);
                }
                else
                {
                    return(this.DeSelectedStyle);
                }
            }
            return(null);
        }
        public override Style EvaluateCondition(object item)
        {
            var frh = new FastReflectionHelper {
                PropertyName = this.ValueMemberPath
            };
            object propertyValue = frh.GetPropertyValue(item);

            if (this.EvaluateConditionAgainstPropertyValue(propertyValue))
            {
                return(this.StyleToApply);
            }
            return(null);
        }
Beispiel #3
0
        public override Style EvaluateCondition(object item)
        {
            var reflection = new FastReflectionHelper {
                PropertyName = this.ValueMemberPath
            };
            object propertyValue = reflection.GetPropertyValue(item);

            if (this.EvaluateConditionAgainstPropertyValue(propertyValue))
            {
                return(this.ValueTrueStyle);
            }
            return(ValueFalseStyle);
        }