PublicClientApplicationBuilder.WithParentActivityOrWindow Method

Definition

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 Xamarin.iOS), Activity (if using Xamarin.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

windowFunc

Func<IntPtr>

Func<nativeint>

A function to return the current window

Returns

The builder to chain the .With methods

Attributes

Applies to

WithParentActivityOrWindow(Func<Object>)

Sets a reference to the ViewController (if using Xamarin.iOS), Activity (if using Xamarin.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

parentActivityOrWindowFunc
Func<Object>

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