-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMainPage.xaml.cs
37 lines (31 loc) · 1.08 KB
/
MainPage.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Evergine.Common.Input.Mouse;
using UIWindowSystemsDemo;
namespace UIWindowSystemsDemo.MAUI
{
public partial class MainPage : ContentPage
{
private readonly MyApplication evergineApplication;
private InteractionService interactionService;
public MainPage()
{
InitializeComponent();
this.evergineApplication = new MyApplication();
this.evergineView1.DisplayName = "DefaultDisplay";
this.evergineView1.Application = this.evergineApplication;
RegisterInteractionService();
}
private void RegisterInteractionService()
{
interactionService = new InteractionService();
evergineApplication.Container.RegisterInstance(interactionService);
}
private void ResetCameraClick(object sender, EventArgs e)
{
interactionService.ResetCamera();
}
private void DisplacementChanged(object sender, ValueChangedEventArgs e)
{
interactionService.Displacement = (float)e.NewValue;
}
}
}