我在Page1.xaml.cs(代碼隱藏)中有一個事件,該事件需要更改ViewModel中的所有屬性。這是一個示例:(Page1.xaml.cs)public Page1(){ InitializeComponent(); example.Event += example_Event;}private void example_Event(...){ // here I want to change all Properties in my ViewModel}我怎樣才能做到這一點?編輯我有一個顯示.ppt的WebBrowser-Control。觸發此事件后,我想更新ViewModel中的所有屬性:xaml.cs:private void powerPointBrowser1_LoadCompleted(object sender, NavigationEventArgs e) { //... oPPApplication.SlideShowNextSlide += ppApp_SlideShowNextSlide; //Event that gets triggered when i change the Slide in my WebBrowser-Control }private void ppApp_SlideShowNextSlide(PPt.SlideShowWindow Wn) { // here i dont know how to get access to my Properties in my VM (i want to call OnChangedProperty(//for all properties in my VM)) }
- 1 回答
- 0 關注
- 184 瀏覽
添加回答
舉報
0/150
提交
取消