Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Adding a WPF user control to an UltraWinGrid
posted

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,