Closed mattleibow closed 1 year ago
Issue moved from dotnet/maui#7773
From @kristinx0211 on Monday, June 6, 2022 5:03:09 AM
verified repro on android 12 with vs 17.3.0 Preview 3.0 [32605.41.main].
@mattleibow DesignMode.IsDesignModeEnabled
seems to be an API provided by MAUI and does not seem to call into any XA function. Can you clarify where in XA the issue potentially is?
Hi @mattleibow. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
I was just moving an issue from @beto-rodriguez
I do not know know if this issue belongs to Xamarin or MAUI but you can reproduce the issue in the provided repo.
Maybe we need to go back to the OG issue. You are saying that the property says it is not in design mode when on the emulator? I think that behavior is correct as the emulator is not design mode. It is a running app in a valid environment.
Are you looking for a way to determine a device vs emulator? This is sometimes had as emulators try their best to pretend. But you can maybe try the essentials api DeviceInfo and is the type physical vs emulator.
The problem I see is that the property does not behave as the documentation says, the docs say:
true if the applications is being run in a previewer, false is the applications is being run on a device or emulator.
So according to the docs, it seems like a bug.
In my case this issue causes that a SkiaSharp-based control is not drawn in the emulator, you can find more info about the case at https://github.com/dotnet/maui/issues/7350.
In the case of LiveCharts, the issue is that I cannot load SkiaSharp in the designer (not sure if possible), So when the chart is in the designer, I just do not draw the control. That seems to work fine, but only in MAUI the library has this issue.
This is a MAUI API, so I don't think there's anything for XA to do here. https://github.com/dotnet/maui/blob/ff02f57419b5337e430cc9d9fc4d6c28577876a4/src/Controls/src/Core/DesignMode.cs#L6
Closing. If this is still an issue it needs to go back to the original MAUI issue or a new MAUI issue.
Issue moved from dotnet/maui#7773
From @beto-rodriguez on Sunday, June 5, 2022 6:07:45 PM
Description
The
DesignMode.IsDesignModeEnabled
is not working as it should. The property value is true even when it is running inside the Android emulator:Steps to Reproduce
If ran on WinUI:
If ran on Android emulator:
You can find additional information about this issue at https://github.com/dotnet/maui/issues/7350
Version with bug
6.0 Release Candidate 3
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12 (at least)
Did you find any workaround?
No
Relevant log output
No response