Why is the data grid in my custom task pane blank? RRS feed

  • Question

  • I created a VSTO app level add-in to Word.

    I created a WPF Custom Control library and used it to create a custom task pane with a data grid.

    During design time I can see the sample data.  During run time I see column headers but no data.

    Any idea what I might be doing wrong?  Any tutorials/sample code out there with data in the CTP (using a WPF Custom Control Library)?




    Friday, September 30, 2011 1:29 AM


All replies

  • Hi John,


    Thanks for posting in the MSDN Forum.


    I would recommend you take a look at Using WPF Controls in Office Solutions first. I tried to use a datagrid component of WPF in Custom task pane via following this article. It works fine on my side.


    You need build the project when you ready to add the WPF Control in to you User Control.


    If you have any questions, please feel free to let me know.


    Have a good day,



    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, October 3, 2011 7:12 AM
  • Yes, I used that and couldn't get it to work. 

    I also tried to modify a sample project:

    I built and ran her solution, everything worked fine.  I added the datagrid to her custom task pane, and again, the preview worked in design time, but in run time only the column headings show up.  Everything else in her sample works fine.

    At this point, if I could get any datagrid (not just WPF) to work in a custom task pane I'd be happy.



    Tuesday, October 11, 2011 7:21 PM
  • Sorry, this is not an answer (solution).  I already said that I have a WPF library working.  My problem is getting a grid to work in a custom task pane. 
    Wednesday, October 12, 2011 6:28 AM