Thursday, 15 March 2012

.net - How do I create a binding that involves some sort of formula? -


For example, if I have an element whose size I want to double the size of another element, how do I get it? this?

An example would be the following, mirroredObject is the object I want to give half of its width to the breadth of the border object.

& lt; Boundary width = "{binding real-world, elementname = mirrored object, mode = default}" />

I have other conditions, where I would like to bind the property, it can be the sum of the width of other elements, how do I get it?

solution

Please see my answer to the solution which was received from the answer of lenanovd.

You can use binding converter which convert to another int using your formula . Please refer to the article for examples of binding converter.

Hope it helps.


No comments:

Post a Comment