Prevent UI from freezing without additional threads

前端 未结 7 2042
耶瑟儿~
耶瑟儿~ 2020-12-16 04:48

What solutions do I have if I want to prevent the UI from freezing while I deserialize a large number of UI elements in WPF? I\'m getting errors complainig that the objects

7条回答
  •  北海茫月
    2020-12-16 05:35

    Here is a wonderful blog posting from Dwane Need that discusses all the available options for working with UI elements amongst multiple threads.

    You really haven't given enough detail to give a good prescription. For example, why are you creating UI elements yourself at all instead of using databinding? You might have a good reason, but without more details it's hard to give good advice. As another example of detail that would be useful, are you looking to build complex deeply nested control hierarchies for each piece of data or do you just need to draw a simple shape?

提交回复
热议问题