From what I remember, moving away from GDI+ was supposed to make the UI faster, help eliminate flicker and help with HiDPI. We only seem to have got one out of the three.
Moving away of GDI/GDI+ is a Microsoft request. They are deprecated.
MS says GDI will coexist for an unknown time scale, but people must move away.
MS replaced them by Direct2D, saying lots of advantages, and some we can’t see reflected in Xojo (as transparency, Xojo is composing things in a way that it ends with opaques causing design problems) and Direct2D will take full advantage of system’s GPU and release memory blocks used by GDI in systems able to do that (using the video card memory).
So speed impacts must be measured by bechmarking code playing with lots of video updates in an old Xojo and running the similar code in the current one, in a modern machine.
If this happens then you’re in trouble anyway.
Obviously. That’s why people must find a way to avoid it.
In my use case the number of adds/removes is small so my approach suffices. I don’t know how Xojo manages .Add and .RemoveAt, and in using that approach I avoided premature optimisation. Such optimisation I certainly had to employ when dealing with text, where Text was next to useless, and String was acceptable only when used along with MemoryBlocks. I moved away from Text some years before it became deprecated.
We are not talking about you or your use case. Just about the OP case. Your design for your case can be just ok. I don’t know.
I don’t think this was “Microsoft request”.
Noone else uses Direct2D for their UI frameworks except maybe some media oriented frameworks like Unreal Engine maybe, not even Microsoft them self’s use it in Windows Forms for example.
Windows Forms Framework (which now is first class supported citizen again), is GDI / GDI+