How perform calculation on a XAML Binding value: reverse it, multiply it, subtract from it or add to it?
问题 First; the question is rhetorical, I have an answer! I have gotten so much help from looking here that I wanted to give this neat trick back. Imagine that you have a value that you want to bind to, but it is somehow or somewhat wrong. I had a situation where I wanted to bind to a value, but when the value was 1, I needed 0, and vice-versa. There was a time when I wanted to bind the width of an element to the width of a parent - 68px. 回答1: Enter the FirstDegreeFunctionConverter : using System;