[]
A helper class that allows to use a slider control for a zoom factor value, placing zoom factor 1 (no zoom) in the middle of the slider control.
public class ZoomSliderScale
Consider a 2cm long slider used to set zoom values in the range from 0.1 to 10 (i.e. from 10% to 1000%). Using ZoomSliderScale, the first centimeter of the slider will correspond to zoom values from 10% to 100%, and the second centimeter will correspond to zoom values from 100% to 1000%. On the other hand if a simple linear slider were used, all zoom values between 10% and 100% would have been squeezed into the first two millimeters of the slider, making it very hard to set those values.
Name | Description |
---|---|
ZoomSliderScale(double, double, int, int) | Initializes a new instance of the ZoomSliderScale class. |
Name | Description |
---|---|
SliderValue(double) | Converts a zoom factor to the corresponding slider value. |
ZoomFactor(int) | Converts a slider value to the corresponding zoom factor. |