I had a cursorposition property in my viewmodel that decides the position of cursor in textbox on the view. How can i bind the cursorposition property to actual position of the cursor inside the textbox.
I had a cursorposition property in my viewmodel that decides the position of cursor
Share
I’m afraid you can’t… at least, not directly, since there is no “CursorPosition” property on the TextBox control.
You could work around that issue by creating a DependencyProperty in code-behind, bound to the ViewModel, and handling the cursor position manually. Here is an example :