Remote Deskop Disconnect/Reconnect Issues
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* Windows version: Windows10
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
**Problem description:**
Not sure if question/defect.
I've done alot of googling found some responses, but nothing that ultimately helps.
When reconnecting to a remote desktop session we are seeing the following.
* Controls being unloaded then reloaded
* Controls within DataTemplates being completed re-created
Is there anyway to prevent this from happening ?
We have ported a very large Silverlight application to WPF and this is biting us pretty hard.
In some cases we been able to refactor some logic to reduce the number of usages of loaded/unloaded events.
But we also have alot of Behaviors, Converters, etc breaking within a DataTemplate.
We making very slow progress here, and hoping to find a more of a global solution to prevent this from occurring.
If you can please assist.
Many thanks
**Minimal repro:**
With the below reconnect to disconnected remote desktop session.
Notice the Unloaded then Loaded callback hits.
Notice the hashcode for the TextBlock has changed.
```xml
Test
Contributor guide
Assessment
This issue has not been assessed yet.