Тёмный

Understanding Prism 8 DelegateCommands, ObservesProperty, ObservesCanExecute 

Wpf World
Подписаться 1,4 тыс.
Просмотров 322
50% 1

Опубликовано:

 

23 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5   
@mastersham
@mastersham 3 месяца назад
Thanks this is just what I need!
@learnwithkharsh
@learnwithkharsh 3 месяца назад
You're welcome! Glad to hear it's helpful for you! 😊
@김재원-m2j
@김재원-m2j 5 месяцев назад
Thanks for the great material! One question to ask... the binding of property (such as Command and IsChecked, etc) between Toolbarview.xaml and ToolbarViewmodel was successfully done even though the datacontext of the usercontrol was not declared. How was it possible?
@learnwithkharsh
@learnwithkharsh 5 месяцев назад
It's great to hear that you found the material helpful! ❤️ Regarding your question about the binding of properties between ToolbarView.xaml and ToolbarViewModel, Prism's view discovery mechanism allows for implicit data context creation. This is made possible by the ViewModelLocator feature provided by Prism. The ViewModelLocator automatically locates and assigns the appropriate view model instance to the view based on naming conventions and view-model naming patterns. Prism's ViewModelLocator uses a naming convention to match the view model to the view. For example, in our case the view is named as "Toolbarview.xaml," Prism will search for a view model named with "ToolbarViewmodel.cs" and automatically assign an instance of this view model to the view's DataContext.