Hello,
Here is the current problem I am facing:
I have an existing Windows Form application and would like to integrate Lync controls into this app. Since converting the win form application to WPF is not feasible due to the enormity of the app, I had to resort to creating a WPF Lync User Control and adding it to my windows form:
http://msdn.microsoft.com/en-us/library/gg436919.aspx
So far, so good. I am able to access this control (added to a panel) on the windows form and it works fine. Now I need to add this control to a Win grid. (The datagrid has a column which lists the users and I want to add this Lync user control so that I can automatically invoke the Lync conversation if the user is available online). Any idea on how to add this custom control to the grid. I tried setting the EditorComponent to an elementHost but no luck..
With e.Layout.Bands(0)
.Columns.Add("Lync")
.Columns("Lync").EditorComponent = element
.Columns("Lync").DataType = GetType(System.Windows.Forms.Integration.ElementHost)
End With
I cannot use the .Editor Property as it complains that elementHost cannot be converted to EmbeddableEditorBase.
Thanks,
Generally speaking, you can use any Windows Forms control within a grid cell using an UltraControlContainerEditor to host it. To be honest, I don't know how this will work with a WPF control, but if the Windows Forms wrapper behaves as expected it should function correctly.
That's a good idea but the Me.ultraControlContainerEditor1.EditingControl only accepts Windows controls and does not accept Lync controls yet. Any other ideas?
vemul
use a winform control, host your wpf control in it. and then host your winform control in the ultraControlContainerEditor1. that's way how i do it.
unfortunately, if you have animation features in wpf, they would not appear right in wingrids. you have to refresh the animation with your mouse hover across the cells. if it is all still, it will be fine.