|
-
Aug 13th, 2012, 08:58 PM
#1
Thread Starter
New Member
Adding a custom control to a stackpanel from another class
I have a window with a stackpanel named stackpanel and I have added some custom controls to it in xaml which works great.
Now my program dynamically creates some user controls (with buttons) inside the stackpanel. I want to be able to click a button inside my user control and dynamically add another control to the stackpanel.
I can't seem to get this to work since it is in a different class. How can I add a control to the stackpanel from another control? I couldn't figure out how to use directcast either.
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|