Hi
I have a TextAnnotation which is set up to edit, I use KeyUp event handler to inspect the Text property but this property does not get updated. If I set the Text value in code I can read it back with the value set in code no problem.
The KeyEventArgs parameter has the character typed but thinking I shouldn’t need to build up a string of entered text?
Looked through documentation and Q&A but nothing relevant.
Thanks
Miles
- Miles Merckel asked 7 years ago
- You must login to post comments
Hi Miles
If you bind your TextAnnotation.Text to a property in a ViewModel, you will be notified when the text changes in the Viewmodel setter.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 7 years ago
-
Hi Andrew Thanks for the reply. On closer inspection it does update the Text property but only when it loses focus. A regular Textbox does the same but the text property can be forced to update on a property change without losing focus by using Text=”{Binding MyBillboardText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}” This approach doesn’t work for the TextAnnotation so I will use the lose focus approach. Thanks Miles
- You must login to post comments
Please login first to submit.