silverlight模板

<!-- 全局模板 - 任何地方都可引用 -->
        
<!--
        ControlTemplate - 自定义控件模板。用于修改控件的外观。各个控件的默认模板可参见文档
            x:Key - 唯一标识
            TargetType - 目标对象类型
        ContentPresenter - 用于显示继承自 System.Windows.Controls.ContentControl 的控件的内容
        TemplateBinding - 绑定到所指定的属性名称
        
-->
        
< ControlTemplate  x:Key ="templateTestApp"  TargetType ="Button" >
            
< Border  BorderBrush ="Red"  BorderThickness ="1" >
                
< Grid  Background =" {TemplateBinding Background} " >
                    
< ContentPresenter  HorizontalAlignment ="Right"   />
                
</ Grid >
            
</ Border >
        
</ ControlTemplate >

你可能感兴趣的:(silverlight)