How to change the Viewpoint of SceneView?

1153
2
Jump to solution
01-09-2017 08:25 PM
CharlieMatherne1
New Contributor II

I'm using ArcGIS Runtime 100.0 .NET (using C#).  I've got a SceneView set up using MVVM.  I'd like to know how I can set the camera from my ViewModel which only has a Scene object.  Best I can tell, I have no option to get at the camera or viewpoint from Scene object.

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
AnttiKajanus1
Regular Contributor II

Hi,

There are multiple ways to implement MVVM design pattern into application so it party depends from that. It comes to down how you want to abstract the View (in this case MapView) from the ViewModel.

Discussion on hit testing covers the same problem essentially. You can find the sample code from Xaml is here and C# is here. I will try to write a blog post about this updated to the 100.0.0 in couple of weeks. As mentioned, this is just one way of doing it such as using view services concept or event aggregator.

View solution in original post

2 Replies
AnttiKajanus1
Regular Contributor II

Hi,

There are multiple ways to implement MVVM design pattern into application so it party depends from that. It comes to down how you want to abstract the View (in this case MapView) from the ViewModel.

Discussion on hit testing covers the same problem essentially. You can find the sample code from Xaml is here and C# is here. I will try to write a blog post about this updated to the 100.0.0 in couple of weeks. As mentioned, this is just one way of doing it such as using view services concept or event aggregator.

CharlieMatherne1
New Contributor II

Excellent!  Thank you Antti!

I'd lost sight of the Controller approach...I've not put it to use yet.  This certainly puts me on the right track!

0 Kudos