SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

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

Version
4.2.3
  • You must to post comments
0
0

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

  • milesm
    Hi AndrewThanks 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 usingText=”{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 to post comments
Showing 1 result
Your Answer

Please first to submit.