I am using caliburn micro in my Wpf application. I would like to scroll down a text box when it's content is more. I don't want to use view's code behind to achieve this functionality. I have google it and found the following link.
Use view's code behind directly. Though it may be a workaround, I am not happy with this approach because I consider this is the starting point of bad practice.
I found one more reference to achieve similar functionality using Rx (reactive extensions)
Reactive Extensions for .NET (Rx) in WPF - MVVM
I don't know how to use it in the context of Caliburn Micro.
Similar question was asked by another stackoverflow member here however no satisfactory response.
I have to do two things.
- Subscribe Text Changed event
- Get the Textbox object from sender parameter (or somehow the textbox object) and execute
ScrollToEnd()
method of it
I guess it is possible either by IHandle
of Caliburn micro or Rx(Reactive extensions). Could some one please help me how to achieve this functionality?