© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4d ago•
18 replies
klemetti

.NET 8.0 MAUI (android or just emulator) inconsistencies?

intermediatemaui
Thank you for reading this! I just had an idea for an app today and I never made a mobile app before, I have some experience with c++, c, c#, java from university but not with mobile development.
So I followed some toutorials and I read the documentation from MAUI and there is this
⁨
PanUpdatedEvent(object sender, PanUpdatedEventArgs e)
PanUpdatedEvent(object sender, PanUpdatedEventArgs e)
⁩
the event args provide e.TotalX and e.TotalY
and I saw issues related to this event on stack overflow, but none had this exact issue, only stutters, moving after event.., but not sure what this does yet, ai isn't really helping with this.

To me it appears as if on windows the event will provide e.TotalX, e.TotalY
and on my android emulator from visual studio, it will provide e.DeltaX, e.DeltaY
delta X,Y doesn't exist, but basically it will provide the drag delta instead and windows will provide the total drag delta since the start of the gesture.
Both is fine, but it's not consistent
So my fix is currently this, but it would suprise me if I actually needed this, like usually c# libraries work pretty well, also I had some other inconsitencies on my emulator, like TopRow.Height.Value being 1 on android.
⁨
  private void OnViewSlider(object sender, PanUpdatedEventArgs e)
  {

      if (e.StatusType == GestureStatus.Started)
      {
          guesture_start = TopRowScrollView.Height;
      }
      if (e.StatusType == GestureStatus.Running)
      {
          double current = TopRowScrollView.Height;
          double deltaOrTotal = e.TotalY;
          double correct = guesture_start + deltaOrTotal;
          double android = current + deltaOrTotal;

          correct = DeviceInfo.Platform == DevicePlatform.Android ? android : correct;


          TopRow.Height = Math.Max(correct, 50.0);
      }
  }
  private void OnViewSlider(object sender, PanUpdatedEventArgs e)
  {

      if (e.StatusType == GestureStatus.Started)
      {
          guesture_start = TopRowScrollView.Height;
      }
      if (e.StatusType == GestureStatus.Running)
      {
          double current = TopRowScrollView.Height;
          double deltaOrTotal = e.TotalY;
          double correct = guesture_start + deltaOrTotal;
          double android = current + deltaOrTotal;

          correct = DeviceInfo.Platform == DevicePlatform.Android ? android : correct;


          TopRow.Height = Math.Max(correct, 50.0);
      }
  }
⁩
Do emulators have such issues, am I doing something wrong, or is it an issue from the library?
Greatly aprechiate any help/explanation
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Maui .NET 8.0 On macOS
C#CC# / help
2y ago
Maui .NET 8.0 On macOS
C#CC# / help
2y ago
.NET MAUI Android Licenses
C#CC# / help
16mo ago
❔ .NET MAUI Android Filesystem
C#CC# / help
3y ago