你的位置:首页 > 软件开发 > ASP.net > sliverligth自定义控件外观(一)

sliverligth自定义控件外观(一)

发布时间:2015-05-06 20:01:30
ControlTemplate 介绍  在sliverligth中我们往往会自定义一些控件的外观,或者创建新的空间,这里主要通过ControlTemplate来实现。  ControlTemplate类,派生自FrameworkTemplate类,命名空间为System.Wind ...

ControlTemplate 介绍

  在sliverligth中我们往往会自定义一些控件的外观,或者创建新的空间,这里主要通过ControlTemplate来实现。

  ControlTemplate类,派生自FrameworkTemplate类,命名空间为System.Windows.Controls;引用程序集System.Windows.dll。

在XAML中定义ControlTemplate

  要在XAML中定义ControlTempalte主要有三种方法。

  1)将Template本地设置成内联定义的ControlTemplate

sliverligth自定义控件外观(一)sliverligth自定义控件外观(一)
1 <Button Content="Button1">2  <Button.Template>3   <ControlTemplate TargetType="Button">4 5    <!--Define the ControlTemplate here.-->6 7   </ControlTemplate>8  </Button.Template>9 </Button> 

原标题:sliverligth自定义控件外观(一)

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录