In my WPF app i have so many UCs and controls i want to prevent them loading and unloading after user reconnects rdc
I’ve done alot of research to solve the issue but nothing is working.
When reconnecting to a remote desktop session this happpens.
-
Controls being unloaded then reloaded
-
Controls within DataTemplates being completed re-created
is there a way to prevent loading and unloading of controls
my app is running on .NET framework version 4.6
here is my code
public uc()
{
uc.Loaded +=somemethod;
}
somemethod(){
TextBox tb = new TextBox();
this.AddChild(tb); // after getting called again it adds another textbox
}
after reconnect the first breakpoint that gets hit is in the constructor and I don’t know how to debug it further because the stack trace only shows [external code] before this.
dheuv is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.