mardi 21 avril 2015

Edit active WPF control in an active window

I have a WPF window with a WindowsFormsHost object inside it. Ideally, I would like to access the WindowsForm control while the window is active.

I can register a name or anything like that I would need for the WindowsFormsHost control, and then do something along the lines of:

            WindowCollection mainWin = System.Windows.Application.Current.Windows;

In this particular case I know the window I need will always be in mainWin[2], but I'm not sure how I can access the WindowsFormsHost object directly to add a Winform control to it.

Aucun commentaire:

Enregistrer un commentaire