Hi
Is there a way to set the mininum/maximum width for the xamzoombar thumb so that it cannot be resized beyond that width?
Thanks,
Poornima
Hi,
The size of the thumb is related to the level of magnification in the control. The Scale value, which must be set to a value between 0 and 1, indicates that level of magnification. So, for instance, a value of .5 would mean that 50% of the available range of items would be visible.
As a workaround you might be able to use the zoomchanging event and apply limits on the scale property.
I have submitted a feature request for you directly to our Product Management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your features are chosen for development you will be notified at that time. Your reference number is FR14088. If you need any further assistance please do not hesitate to ask.
hi Marianne,
can you please help me out on restricting minimum with for Zoombar thumb.
Regards,
Hi Sharma,
I didn't make myself clear in my initial response. Scale is a property of the Range property of the xamZoombar, but it does not have a setter. Scale is controlled manually by the size and position of the thumb, which can be slide or sized. Or you can set the zoombar's Range properties, Minimum and Maximum values and the Scale will be calculated.
This site may be helpful to you to explain.
http://help.infragistics.com/doc/WPF/2013.2/CLR4.0/?page=xamZoombar_Getting_Started_with_xamZoombar.html
If you used the ZoomChangingEvent, you could interrogate the sender's Range as the initial position and the attribute's NewRange value. You would then know the initial range and the new range. Then you would have to determine if the difference between the NewRange's Minimum and Maximum value was less than you wanted to allow. At that point you could cancel the event or more likely you could set the NewRange values, calculating the appropriate values depending on whether the Minimum or Maximum values had changed. You would probably want some notification that the width of the thumb is being restricted.
The following code may be helpful to you.
void zoombarA_ZoomChanging(object sender, ZoomChangeEventArgs e)
{
Range currRange = (sender as XamZoombar).Range;
Range newRange = e.NewRange;
double minDif = .1;
if ((Math.Round(newRange.Maximum, 5) - Math.Round(newRange.Minimum, 5)) < minDif)
//e.Cancel = true;
if (Math.Round(newRange.Maximum, 5) != Math.Round(currRange.Maximum,5) )
newRange.Maximum = Math.Round(newRange.Minimum + minDif,5);
}
else
newRange.Minimum = Math.Round(newRange.Maximum - minDif, 5);
Please let me know if you have any questions.