Peristiwa
17 Mac, 11 PTG - 21 Mac, 11 PTG
Sertai siri perjumpaan untuk membina penyelesaian AI berskala berdasarkan kes penggunaan dunia sebenar dengan rakan pembangun dan pakar.
Daftar sekarangPelayar ini tidak lagi disokong.
Naik taraf kepada Microsoft Edge untuk memanfaatkan ciri, kemas kini keselamatan dan sokongan teknikal yang terkini.
The static Platform
class, in the Microsoft.Maui.ApplicationModel namespace, contains helpers for each platform.
The Platform
class contains the following helpers on Android:
Member | Purpose |
---|---|
ActivityStateChanged |
An event that's raised when any Activity's state changes. |
AppContext |
A property that gets the Context object that represents the current app context. |
CurrentActivity |
A property that gets the current Activity object that represents the current activity. |
Intent |
A static class that contains the ActionAppAction string, which is the identifier for the Intent used by app actions. |
OnNewIntent |
Pass an Intent from an activity's overridden method, when invoking an app action. |
OnResume |
Pass an Activity from an activity's overridden method, when an Activity is resumed as part of invoking an app action. |
OnRequestPermissionsResult |
Pass permission request results from an activity's overridden method, for handling internal permission requests. |
WaitForActivityAsync |
Wait for an Activity to be created or become active. |
The following example shows how to access the current Context
or Activity
for the running app:
var context = Platform.AppContext;
// Current Activity or null if not initialized or not started.
var activity = Platform.CurrentActivity;
If there's a situation where the Activity is needed, but the app hasn't fully started, call the WaitForActivityAsync
method:
var activity = await Platform.WaitForActivityAsync();
.NET MAUI maklum balas
.NET MAUI ialah projek sumber terbuka. Pilih pautan untuk memberikan maklum balas:
Peristiwa
17 Mac, 11 PTG - 21 Mac, 11 PTG
Sertai siri perjumpaan untuk membina penyelesaian AI berskala berdasarkan kes penggunaan dunia sebenar dengan rakan pembangun dan pakar.
Daftar sekarang