如何在Silverlight中创建UserControl模板 [英] How to create UserControl Template in Silverlight

查看:84
本文介绍了如何在Silverlight中创建UserControl模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的组织遵循同样的展示风格。因此,我想创建一个UserControl模板,它应该布局和设置一个简单的ONE COLUMN TEMPLATE(这里一列意味着一个Label / Widget对)。



当这个UserControl用于其他显示,我们应该能够添加任意数量的Label / Widget对。 (蚂蚁控制,即文本框,列表框,复选框等可以放在其中,每行都有标签)



我在互联网上见过很多例子但是所有这些控件都是从UserControl给出的,但在我的情况下,我们只需要从使用此UserControl的其他页面提供控件。

Our organization follows same kind of display style. Hence I want to create a UserControl template, that should layout and style a simple ONE COLUMN TEMPLATE (here one column means one Label/Widget pair).

When this UserControl is used in other display, we should be able to add any number of Label/Widget pair into it. (ant control i.e. text box, list box, check box etc can be placed in it with label for each row)

I have seen a lot of example over internet but all over these control are being given from UserControl but in my case, we need to provide controls only from other page where this UserControl is used.

推荐答案

请按照以下链接:

通过创建创建新控件一个ControlTemplate [ ^ ]

在用户控件和模板控件之间进行选择 [ ^ ]

如何在Silverlight自定义控件中实现模板绑定? [< a href =http://www.kunal-chowdhury.com/2011/04/how-to-implement-template-binding-in.htmltarget =_ blanktitle =New Window> ^ ]



我建议你在正确的silverlight论坛 [ ^ ];)
Please, follow below links:
Creating a New Control by Creating a ControlTemplate[^]
Choosing between user control and template control[^]
How to implement Template Binding in Silverlight Custom Control?[^]

I would suggest you ask a question on proper silverlight forum[^] ;)


这篇关于如何在Silverlight中创建UserControl模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆