question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zoom after Stretch and ScrollBars

See original GitHub issue

Hi

i’m not sure if its intentional made not to zoom, if SizeMode is not Normal once i change Size Mode to Stretch or Fit zoom doesn’t work

i was trying out this control, where i changed Dock : Fill and SizeMode: Stretch for image to fit within resizable winform. but how can be enable zoom after this ? also is it possible to hide scrolls bars while maintaining image to be at center (AutoCenter : True)?

Thanks

Update: below code didn’t work!

imageBox.HorizontalScroll.Visible = false;
imageBox.VerticalScroll.Visible = false;

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cyotekcommented, May 11, 2017

I had a look and I did spot an issue where the sample code didn’t work properly if the image was very small so even after the first zoom the stretch rule came into play thus resetting the zoom level. I’ll see if I can find a bit of time to play with the sample further.

0reactions
Prakash19921206commented, May 6, 2017

Thank you very much for time & code.

i don’t want to bug you but, it worked if my imageBox size is less than some value, if i gradually increase the size of imageBox, it doesn’t work. i was debugging, below values are when zoom didn’t work (imageBox1.SizeMode before zooming is Stretch)

//these values are from SetSizeMode func, triggered from MouseScroll Event
zoomFactor = 2
viewSize.Width=1400
viewSize.Height = 805
scaledWidth = 1282
ScaledHeight = 962
imageSize.Width = 641
imageSize.Height = 481

probably we have to manually increase zoom factor little bit here right? how much amount and when?

here’s values when zoom work (imageBox1.SizeMode before zooming is Stretch)

zoomFactor = 2
viewSize.Width=1275
viewSize.Height = 805
scaledWidth = 1282
ScaledHeight = 962
imageSize.Width = 641
imageSize.Height = 481

i haven’t set any padding valuesi tried to modify the if statement. then zoom happens but background pixel grid will be noticed

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to stretch my page and get scroll bar when zooming in?
I want the zooming to be like http://stackoverflow.com scroll I'm talking about is in the bottom of the window .
Read more >
Scale element when zoom - HTML/CSS
Firstly on most browsers the scroll bar stays the same size when zooming in. However if you want to change you scroll-bar size...
Read more >
Resizing scrollbars for zoom levels
When a zoom is applied, browsers treat scrollbars like part of the page. Zoom makes pixels larger. If you want something with larger...
Read more >
Changing zoom can cause bottom scroollbar to appear
Start at 100% browser zoom, then zoom out and a scrollbar appears at the bottom. Refreshing the page after changing the zoom will...
Read more >
Remove scrollbar at the bottom when pinch out the share ...
Hello, We want to remove the scrollbar which appears at the bottom of the screen when we pinch out the share screen.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found