怎么创建silverlight custom control
来源:互联网 发布:鞍山北国知春 编辑:程序博客网 时间:2024/05/22 02:02
这篇文章主要是介绍一下简单的Custom Control 的创建方法。
工具是vs2008
1. 首先建立一个siverlight应用程序,我这里暂时命名为CustomControl
2. 然后再建立一个Siverlight Class Library, 在这个Library工程里面建一个名字为themes的文件夹,在这个文件夹里面建立一个名字为generic.xaml的文件。
3. 修改generic.xaml文件的属性, Build Action 的属性修改成Resource, 清空Custom Tool value的值。
4. 创建一个类继承自ItemsControl,名字自己选择,我选择的是LiScrollViewer 因为我想自己弄个简单的ScrollViewer
5. 在构造函数里面制定使用样式的方式:base.DefaultStyleKey = typeof(LiScrollViewer);
6. 修改generic.xaml的内容如下
7. 在这个CustomControl工程里面加入上个控件的引用,这样就可以在这个工程里面进行调用了。
修改工程 CustomControl里面的Page.xaml的内容如下:
8. 编译这个CustomControl工程即可,然后在网页里面调用这个silverlight控件(CustomControl.xap)就可以了
- 怎么创建silverlight custom control
- 创建Custom Control
- Silverlight custom control属性的配置
- Custom Control
- The run order about Loaded event and OnApplyTemplate in custom control of Silverlight 2 beta 2
- Custom Web Control [一]
- custom control的使用方法
- Custom Draw ListView Control
- List control Custom Draw
- silverlight Custom Mouse Cursor
- VC里的Custom Control
- Custom Control控件的使用
- Custom Control控件一个例子
- Custom transaction control with setUserTransaction
- Custom transaction control with openSession
- Custom Control 控件的使用
- Vc List control Custom Draw
- Silverlight ASP.NET control
- 交易中间件分析及三款典型产品介绍
- 14.1 新闻发布系统的介绍
- C语言格式字符大全
- 14.3 在Eclipse下建立项目myNews
- js关闭页面
- 怎么创建silverlight custom control
- 轻松几步获得上万点击率(五)关键词分布
- struts2- Interceptor(默认拦截器)介绍
- 14.4 设计新闻发布系统
- 简单三招看准K线走势
- POJ 1080——Human Gene Functions
- 14.5 编写新闻发布系统的JSP页面
- 让国内顶级公司都汗颜的暴雪娱乐总部窥探(相册,转载收藏)
- 本人用汇编写的一个bmp位图的字符转换程序