Calling a Method of a UserControl in MVVM

前端 未结 7 442
温柔的废话
温柔的废话 2021-01-17 14:26

I\'m having an issue with calling a method on a UserControl. Hear me out:

  1. I have a UserControl someControl in SomeView.xaml

  2. Som

7条回答
  •  执笔经年
    2021-01-17 15:25

    If you have View-first approach (and your VM is instantiated as Resource in XAML) you may use some normal events to connect your control DoStuff method with some event on VM (on Loaded event).

提交回复
热议问题