I have WinForm application with hosted in it WPF(mvvm) part. Is it possible to change dependency property in ModelView from my WinForm ?
I have WinForm application with hosted in it WPF ( mvvm ) part. Is
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is – but your Windows Forms portion would need to understand the WPF types to do it. You can always use the wrapper defined when implementing a dependency property to call it from code.
If you’re hosting a Windows Forms control, however, you’ll likely want to make a WPF wrapper that subscribes to the appropriate events on the control, and uses them to set the dependency property. This way, your Windows Forms portion stays “pure” and doesn’t need modification, and your WPF portion can set everything appropriately.