开发者

According to Datatype,Dynamically Create Control & Using those Control

开发者 https://www.devze.com 2023-02-19 06:35 出处:网络
I want to do a application in silverlight that conta开发者_JAVA百科ins follwing things According to the datatype it receive from the class(which i am giving through wcf service)

I want to do a application in silverlight that conta开发者_JAVA百科ins follwing things

According to the datatype it receive from the class(which i am giving through wcf service) it should create the control. If it encounters string then a text box should be created dynamically. If it encounters bool then a radiobutton should be created.

I want to acess those dynamically created controls.(as name is no static to refer in FindName())

How can i achive that.

Please help me with any related link or any code.

Thanks


In WPF, there's something called TemplateSelector, which does what you're asking for. In Silverlight, you have to write it yourself. This should help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消