Binding approach #10023
sonicsmooth
started this conversation in
General
Binding approach
#10023
Replies: 1 comment
-
In the setter for linscale, I check the range, then SetAndRaise both the linscale and the new logscale property value, and vice-versa for the logscale property. This also prevents nasty loops that happen with round-trip linear->log->linear calculations where there is some floating point error and doing numerical comparison is not exact. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a custom control which has a scale setting that can be changed in a few ways, and both the scale and log(scale) are maintained.
The scale value then goes into a transform matrix which is applied in
Render(...)
this.WhenAnyValue(x => x.LogScale).Subscribe(logscale => LinScale = CalcLinScale(GridlineRatio, logscale, zoomSteps));
However there are some weirdnesses:
WhenAny
is one way, so only one slider affects the other.So question: what strategy should I use to ensure the following:
thanks.
Beta Was this translation helpful? Give feedback.
All reactions