CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    116

    Lightbulb Create Controls at runtime!

    I am really new for WPF, I am trying to create Radiobuttons,checkbox and textbox control at run time.
    Is it possible to create controls at runtime in WPF,if yes then please let me know good link or sample code.
    Thanks for taking your time!

    I am using C# and VisualStudio2008.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+) Arjay has a reputation beyond repute (3000+)
    Join Date
    Aug 2004
    Posts
    10,337

    Re: Create Controls at runtime!

    You can do this in C# code directly. However, you probably don't need to do it this way.

    Can you describe what you are trying to accomplish? There probably is a way to cleanly do it in xaml, so you won't have to use the code behind.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width