I have a WinForms application I'm designing, and I recently added capability to connect to Azure Devops to get a list of test suites/cases.
VssClientCredentials vcc = new VssClientCredentials(false);
connection = new VssConnection(new Uri(azureDevOpsOrganizationUrl), vcc);
When these lines run, the entire form shrinks down (including text sizes, button and frame sizes) and stay shrunken (not minimized, like 1/4 size). Note, that it becomes smaller the what the minimum size of the form is set to.
Here is a side-by-side comparison of the form size before and after: https://i.stack.imgur.com/zQkNw.png
I also just noticed as I was editing some identifying info out of the picture, that the Title on the Top-Left of the frame also disappeared when it shrunk.
Best I could figure it out, the line
VssClientCredentials vcc = new VssClientCredentials(false);
is the line that triggers the shrinking. I assume that this might be some function of the popup it's trying to call, but I'm not really sure why.
private void AzureButton_Click (object sender, EventArgs e)
{
GetAzureNodes();
}
private async void GetAzureNodes()
{
AzureConnection azureConn = new AzureConnection(); //<----- Focus Here
await azureConn.getConnection();
if (azureConn.isConnected())
{
//Stuff
}
}
public AzureConnection() //<----- Focus here
{
// Set false to require login popup every time.
VssClientCredentials vcc = new VssClientCredentials(false);
connection = new VssConnection(new Uri(azureDevOpsOrganizationUrl), vcc);
}
public async Task<int> getConnection()
{
await connection.ConnectAsync();
return 0;
}
Anybody know how to either prevent or undo the shrinking? Or even why it's happening at all?