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<IWin32Window>)

Sets a reference to the current IWin32Window that triggers the browser to be shown. Used to center the browser that pop-up onto this window.

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);
member this.WithParentActivityOrWindow : Func<nativeint> -> Microsoft.Identity.Client.PublicClientApplicationBuilder
Public Function WithParentActivityOrWindow (windowFunc As Func(Of IntPtr)) As PublicClientApplicationBuilder

Parameters

windowFunc
Func<IntPtr>

A function to return the current window

Returns

The builder to chain the .With methods

Attributes

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.

WithParentActivityOrWindow(Func<IWin32Window>)

Important

This API is not CLS-compliant.

Sets a reference to the current IWin32Window 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<System.Windows.Forms.IWin32Window> windowFunc);
member this.WithParentActivityOrWindow : Func<System.Windows.Forms.IWin32Window> -> Microsoft.Identity.Client.PublicClientApplicationBuilder
Public Function WithParentActivityOrWindow (windowFunc As Func(Of IWin32Window)) As PublicClientApplicationBuilder

Parameters

windowFunc
Func<IWin32Window>

A function to return the current window

Returns

The builder to chain the .With methods

Attributes

Applies to