C
C#2y ago
itgel9462

❔ 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
Denis
Denis2y ago
Does node.Surface provide each individual word?
itgel9462
itgel9462OP2y ago
node.Surface is providing only this.
Denis
Denis2y ago
Not really sure what I'm looking at here
itgel9462
itgel9462OP2y ago
Sorry. node.surface is a variable to show words that analyzed.
itgel9462
itgel9462OP2y ago
That is a frame that I created in xaml. I want to display a text 1 by 1 word in this textbox.
itgel9462
itgel9462OP2y ago
var node is providing each individual word.
itgel9462
itgel9462OP2y ago
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.
Denis
Denis2y ago
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 +=
itgel9462
itgel9462OP2y ago
I changed to this. And textbox result became a whole text.
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server