Select to view content in your preferred language

How to Control the zoom in and zoom out in scene view

1580
3
Jump to solution
12-01-2021 01:54 AM
KarthikS
Emerging Contributor

Hi,

We are developing WPF application using ArcGIS Runtime SDK for Dot Net.

How to control the zoom in and zoom out on mouse wheel in scene view.

we need to set min and max value for zoom in and out. How to do this?

Please help

 

Thanks

0 Kudos
2 Solutions

Accepted Solutions
MaximilianGlas
Esri Contributor

Depends on what you want to do:

Either you can listen to the MouseWheel Event or you try to react after in the ViewpointChanged Event and set the viewpoint to the allowed focus.

Maybe this gives you an idea:
https://developers.arcgis.com/net/wpf/sample-code/geoview-viewpoint-synchronization/

 

View solution in original post

0 Kudos
dotMorten_esri
Esri Notable Contributor

In the SceneView there isn't really "zoom". It's a camera that moves forward or backwards when the mouse wheel event fires. So I'm guessing what you really want is a way to control how low or high you can go above the ground?

You could listen to the PreviewMouseWheel event and if your camera altitude is a certain level, set e.Handled = true to prevent the SceneView from reacting to the wheel event.

View solution in original post

0 Kudos
3 Replies
MaximilianGlas
Esri Contributor

Depends on what you want to do:

Either you can listen to the MouseWheel Event or you try to react after in the ViewpointChanged Event and set the viewpoint to the allowed focus.

Maybe this gives you an idea:
https://developers.arcgis.com/net/wpf/sample-code/geoview-viewpoint-synchronization/

 

0 Kudos
dotMorten_esri
Esri Notable Contributor

In the SceneView there isn't really "zoom". It's a camera that moves forward or backwards when the mouse wheel event fires. So I'm guessing what you really want is a way to control how low or high you can go above the ground?

You could listen to the PreviewMouseWheel event and if your camera altitude is a certain level, set e.Handled = true to prevent the SceneView from reacting to the wheel event.

0 Kudos
KarthikS
Emerging Contributor

Hi MaximilianGlas &  dotMorten_esri

Thank you for your support,  I got a result, thank you so much again

 

0 Kudos