npolyak / NP.Ava.UniDock

New (Avalonia 11) UniDock repository
MIT License
154 stars 10 forks source link

Dock content gets re-created on every tab selection when using templates #19

Open adam-adorjan opened 8 months ago

adam-adorjan commented 8 months ago

Looks like issue #5 from the Avalonia 10 version is back. We have tested the Avalonia 11 version of the framework pretty thoroughly and this is the only issue we have right now. The ReloadingProblemSample you have demonstrates this really well. Weirdly it seems like the OldChild of the DockContentPresenter is a TextBlock both in our app and in your sample, regardless of what it's supposed to be. I think the interaction between your PropertyChanged handler and Avalonia's might be messing each other up, possibly some of the default Avalonia code is running that should be overridden. I see both your CreateChild and Avalonia's running sometimes.

If you could try to look into this sooner rather than later that would be super appreciated, we're really under the gun to deliver automation features.

Thanks for this great framework!!!!!!!

npolyak commented 8 months ago

Adam, I'd appreciate if you can create a runnable project that has demos this issue and share it with me.

adam-adorjan commented 8 months ago

Hi Nick. You already have one. Check out your ReloadingProblemSample project, it reproduces the issue perfectly.

Thanks!