I’m watching at this link about how to show row details.
http://www.wpftutorial.net/DataGrid.html#rowDetails
I’d like to put an user control there. But I have no idea to do that. Supose that I have to show differents user control for each one
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.
You can create various
DataTemplateswhich contain instances of theUserControlsyou want in theResourcesof theDataGrid, then you can create aDataTemplateSelectorwhich chooses the right one for you and set that as theRowDetailsTemplateSelector.Edit: Resource use example:
Also make sure to read the
DataTemplateSelectordocumentation.