Answered wpf user control generator

  • Tuesday, May 01, 2012 12:52 PM
     
     
    I have created a wpf project this project create a grid and many controls in this grid and allow the user to change controls properties now i wont to generate a user control dynamically this user control contains the grid and it's controls how can i do this

All Replies

  • Tuesday, May 01, 2012 1:40 PM
     
     

    Hi Amer,

    You got to create a usercontrol dll and add it as a reference to your project.

    Now, as you create your usercontrol you should ensure that those properties of the usercontrol which you'd like to manupulate from your application should be made as dependency properties.

    Here's a link that may help you get started with.

    http://www.codeproject.com/Articles/32825/How-to-Creating-a-WPF-User-Control-using-it-in-a-W

    Please do let me know if this helps.

    Regards,

    Raj

  • Tuesday, May 01, 2012 2:42 PM
     
     
    maybe you didn't understand my question
    I have generated user control files .cs and .xaml
    and i want to create a dll from those files dynamically
  • Wednesday, May 02, 2012 7:09 AM
     
     

    Hi Amer,

    Dynamic dll creation ? You mean you'd like to create the class library dynamically ? I find this to be a very curious requirement. So may i ask you what is that you are trying to achieve ?

    Raj

  • Thursday, May 03, 2012 6:51 AM
    Moderator
     
     Answered

    Hi Amer shammout,

    You could use CodeDom, refer to this article in MSDN:

    http://msdn.microsoft.com/en-us/library/650ax5cx.aspx

    http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Thursday, May 24, 2012 6:01 AM
    Moderator
     
     

    Hi Amer Shammout,
     
    I am marking your issue as "Answered", if you have new findings about your issue, please let me know.

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.