TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lars Holdgaard
NA
3
0
UIelement - Specify type
Sep 17 2009 1:49 PM
I'm in the situation I need to add a control. This control can be a button, label, a homemade control or whatever.
Point is I don't know which type it is.
I got a input which is a UIelement (called original), which has a type. Afterwards I need to create a control of the type UIelement original has.
For instance:
UIelement ele = new TYPE-OF-original;
Or even better:
UIelement ele = new UIelement;
ele.SetType = TYPE-OF-UIELEMENT;
Problem is I don't think you can set a type to a UIelement.
I can get the type of UIelement by the GetType() method. But how do I add it generic?
UIelement ele = new GetType(original)
.. Dosnt work either
Further on I might need to be able to set width/height of the control, which UIelement dosn't support.
Reply
Answers (
3
)
How would you have done it?
Does AN MDD Platform With Custom Coding Features Interest You?