简体   繁体   中英

What is the best method to append text to TextBox element in Universal Windows Apps

In my Universal Windows App i want to log some events and writing them in a TextBox Element. But i couldn't find a method like named "appendText". And below method makes flickering on screen

txtbox.Text += log;

What is the best method to appendText for TextBox or TextBlock or RichTextEdit elements?

if you want to display some logging information, it might be read only information so using a TextBlock is already an optimization. Then, depending on your needs, a multi-item control such as a ListBox, ListView or GridView might be even better for logs. If you have more than hundreds of lines, think about using virtualization.

https://msdn.microsoft.com/en-us/library/windows/apps/mt574120.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM