How to programatically create a xaml panel with controls

Posted by randy on Stack Overflow See other posts from Stack Overflow or by randy
Published on 2010-03-09T02:19:04Z Indexed on 2010/03/09 2:21 UTC
Read the original article Hit count: 242

Filed under:
|
|

Hello,

Is it possible to programatically create a new panel within a current document that contains duplicate elements? For example when the window loads I have a grid (one row) with three text fields, Fname01, Lname01, and DOB01, I would like to have a button that when clicked would append a new row to the grid with three new fields (Fname02, Lname02, and DOB02). Each time the button is clicked (addrow) a new row would be created. I am also interested to learn how these fields are identified within the xaml that would allow me to databind or programatically reference the created fields for insertion of the values into a database etc.

Thank you in advance,

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#4.0