How do I resize the login window in a C# WPF app?

This is how the Auth0 login screen appears when I open it from a C# WPF app:

![Auth0 Login in a C# WPF app][1]

The top portion can’t be seen. There are no scrollbars and the window cannot be resized. Only the full screen option allows the user to see the entire login form.

Here’s the code I’m using to open it:

try
{
    var auth0 = new Auth0Client(
        Properties.Settings.Default.auth0Domain,
        Properties.Settings.Default.auth0ClientID);
    var handle = new WindowInteropHelper(this).Handle;
    var windowWrapper = new WindowWrapper(handle);

    var user = await auth0.LoginAsync(owner: windowWrapper, 
        withRefreshToken: true, device: "DeviceName");
}
catch (Exception e)
{
    Utilities.AppendLog("User login exception: " + e.Message);
}

I’d like to resize the window so the user can see the entire login form. What do I need to do?

Based on a quick analysis of the code, the Auth0.WinformsWPF library does not allow the size of the windows to be externally configured so you may want to open an improvement request, a pull request or fork the library so that you can provide a specific size.

As an alternative, what’s shown on that window is the hosted login page which you can configure through your Auth0 Dashboard. For example, assuming that your hosted login page is currently the default one and is using Lock 10, you could customize it so that the social login buttons use a smaller appearance which would most likely provide a workaround for your current situation.

I am busy replacing the current Auth0.WinformsWPF NuGet package with a newer one which is based on the IdentityModel OidcClient package (NuGet Gallery | IdentityModel.OidcClient 5.2.1)

Please see the sample applications for Windows Forms or WPF over here:

The window sizing in this version is better and should display the login screen properly

The actual NuGet package for WPF is located here:

Let me know if this one works better for you

Thanks, jmangelo. We ended up changing the login widget to fit the default size of the window. I did submit a ticket to request an improvement. The answer below suggests that they’re already working on it.

Thanks, jerrie1. I’m not comfortable using pre-release code, but it’s good to know that you’re working on this issue.