Additional question about a user control loading more than once

Rod At Work 866 Reputation points
2020-03-20T17:43:42.057+00:00

Earlier I asked why a datagrid was causing the window to load more than once. I got the answer, and thank you for your responses!

However, in a strange coincidence, the release version of the app still exhibits the same behavior. Although it does look somewhat different. It does flash up twice, but not quite in the same way. Now it's faster, but still discernible. Anyway, I took the information I learned from asking here and related in the answer to the above link and implemented it in the custom user control. (I didn't know when I first asked my question here until I saw the response on the Stack Overflow post, that the issue was a custom user control in a tab control.)

Here's where it gets tricky. I've built the project on my dev machine and tested it. There's no flashing at all. I can't see it when I'm debugging it in Visual Studio. And I cannot see a flashing (double loading) when I run the app from the bin\Debug folder on my machine.

But if I run the release version (we're using ClickOnce deployment) I do see the flashing/loading of the custom control with the datagrid in it.

So the thought occurred to me that maybe it has something to do with the build environment? I'm using VS 2019 on my dev box. But our TFS build agent uses VS 2015. Could that be what's resulting in the different behavior?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,671 questions
{count} votes