❔ WPF textbox
Hey. There are 2 tasks I need to to.
1. (var node in tagger.ParseToNodes(SpeechResult.Text) is dividing a text into words) I want to display the words 1 by 1 in textbox that created in XAML.
2. Control time between word appearances.
10 Replies
Does
node.Surface
provide each individual word?node.Surface is providing only this.
Not really sure what I'm looking at here
Sorry. node.surface is a variable to show words that analyzed.
That is a frame that I created in xaml. I want to display a text 1 by 1 word in this textbox.
var node is providing each individual word.
Hey guys. I'm trying to make it. But here is some unclear stuff. I ran this program and getting the last word of the text as a result in textbox. I've no idea why.
Because
SpeechResult.Text = item.value
sets the text to the last value
Instead you want to append the values
Use +=
SpeechResult.Text += item.value
+= is a short hand operator
It takes the current text, appends the new value to it, and saves the result into the textbox
SpeechResult.Text = SpeechResult.Text + item.value
This is the long version, which is shortened with +=I changed to this. And textbox result became a whole text.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.