04-23-2023, 10:54 PM
We have a Zoom Panel in a ScrollViewer and when the zoom panel is loaded with content that causes it use a zoom factor greater that 1.0 and the thumbnails appear on the scroll bars the vertical scrollbar has the offset and thumbnail size incorrectly set. If you click the up or down buttons on the scrollbar or call any of the vertical related methods, such as LineDown, LineUp, SetVerticalOffset method you get an error like
'0.1,NaN,0.8,0.8' is not a valid value for property 'Viewbox'.
You can trigger this error with the ZoomPanel samples. Load the application and go to the Other Methods page and make sure the first button you click is one of the following:
LineUp, LineDown, MouseWheelUp, MouseWheelDown, PageUp, PageDown or SetVerticalOffset
This will all trigger the error. However if you chose one of the other options first then click one of the above no error is thrown. For example click any of the horizontal related methods first and then one of the vertical ones and it is fine.
If you modify the sample to put a scrollviewer around the ZoomPanel you will notice the vertical scrollbar has an incredibly small thumbnail and is at the top of the scrollbar.
This doesn't occur in the ScrollViewer sample because the initial zoom factor is not greater than 1.0. In the set methods page you can see the image is larger that the view port and so the initial zoom factor is greater than 1.
If you set the ZoomFactor of the ZoomPanel to a value greater than 1 in the constructor of the ScrollViewer sample you will get the error. If you set the zoom factor in Loaded event it is fine. Regardless of where you set the Zoom Factor the Horizontal scrollbar always works fine.
'0.1,NaN,0.8,0.8' is not a valid value for property 'Viewbox'.
You can trigger this error with the ZoomPanel samples. Load the application and go to the Other Methods page and make sure the first button you click is one of the following:
LineUp, LineDown, MouseWheelUp, MouseWheelDown, PageUp, PageDown or SetVerticalOffset
This will all trigger the error. However if you chose one of the other options first then click one of the above no error is thrown. For example click any of the horizontal related methods first and then one of the vertical ones and it is fine.
If you modify the sample to put a scrollviewer around the ZoomPanel you will notice the vertical scrollbar has an incredibly small thumbnail and is at the top of the scrollbar.
This doesn't occur in the ScrollViewer sample because the initial zoom factor is not greater than 1.0. In the set methods page you can see the image is larger that the view port and so the initial zoom factor is greater than 1.
If you set the ZoomFactor of the ZoomPanel to a value greater than 1 in the constructor of the ScrollViewer sample you will get the error. If you set the zoom factor in Loaded event it is fine. Regardless of where you set the Zoom Factor the Horizontal scrollbar always works fine.