wp7 - TextBlock with a lot of text - huge memory usage - how to avoid it?

后端 未结 3 1060
小蘑菇
小蘑菇 2020-12-19 21:42

I have a problem in my app and I don\'t know if it is normal or not. I have a textblock in my application that needs to display a large amount of text (2000-4000 chars). Any

3条回答
  •  青春惊慌失措
    2020-12-19 22:02

    For a large amount of text in a single control it is normal to consume larger amounts of memory than expected. As it was mentioned before, you can page the text or implement dynamic loading, where only chucks of text are loaded for the visible area. That way you won't be keeping a large string in memory.

    In your case, caching would be related to re-use and content reloads whenever the user switches to a different page, not to the initial content loading and manipulation process.

提交回复
热议问题