PublicClientApplicationBuilder.WithParentActivityOrWindow Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
WithParentActivityOrWindow(Func<IntPtr>) |
Sets a reference to the IntPtr to a window that triggers the browser to be shown. Used to center the browser that pop-up onto this window. |
WithParentActivityOrWindow(Func<Object>) |
Sets a reference to the ViewController (if using iOS), Activity (if using Android) IWin32Window or IntPtr (if using .Net Framework). Used for invoking the browser. |
WithParentActivityOrWindow(Func<IntPtr>)
Important
This API is not CLS-compliant.
Sets a reference to the IntPtr to a window that triggers the browser to be shown. Used to center the browser that pop-up onto this window.
[System.CLSCompliant(false)]
public Microsoft.Identity.Client.PublicClientApplicationBuilder WithParentActivityOrWindow (Func<IntPtr> windowFunc);
[<System.CLSCompliant(false)>]
member this.WithParentActivityOrWindow : Func<nativeint> -> Microsoft.Identity.Client.PublicClientApplicationBuilder
Public Function WithParentActivityOrWindow (windowFunc As Func(Of IntPtr)) As PublicClientApplicationBuilder
Parameters
Returns
The builder to chain the .With methods
- Attributes
Applies to
WithParentActivityOrWindow(Func<Object>)
Sets a reference to the ViewController (if using iOS), Activity (if using Android) IWin32Window or IntPtr (if using .Net Framework). Used for invoking the browser.
public Microsoft.Identity.Client.PublicClientApplicationBuilder WithParentActivityOrWindow (Func<object> parentActivityOrWindowFunc);
member this.WithParentActivityOrWindow : Func<obj> -> Microsoft.Identity.Client.PublicClientApplicationBuilder
Public Function WithParentActivityOrWindow (parentActivityOrWindowFunc As Func(Of Object)) As PublicClientApplicationBuilder
Parameters
The parent as an object, so that it can be used from shared NetStandard assemblies
Returns
The builder to chain the .With methods
Remarks
Mandatory only on Android to be set either from here or from AcquireTokenInteractive builder. See https://aka.ms/msal-net-android-activity for further documentation and details.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應