Using Caliburn Micro MVVM, I'm trying to control a ScrollViewer from code behind. I have a button click that is handled in the viewmodel. I also need to call methods on a ScrollViewer, which I believe can only be done from the view.xaml.cs code behind file.
I've tried 2 things. 1) EventHandler 2) Caliburn Micro IHandle
Neither way seems to hit the code behind file.
Here's the code for option 2
ViewModel:
_eventAggregator.PublishOnUIThread(new MyClickMessage(this)); Code-behind (view.xaml.cs) file:
public partial class MyClass: UserControl, IHandle<MyClickMessage> { public MyClass() { InitializeComponent(); } public void Handle(MyClickMessage message) { NOT HITTING HERE } } Any advice immensely appreciated.