Silverlight入门教程(18)

逝伤 分享 2021-04-05 下载文档

资料,教程,编程,文集

tSize="32" FontWeight="Bold"> LINEAR GRADIENT BRUSH <TextBlock.Foreground>
<GradientStop Color="Red" Offset="0.0" /> <GradientStop Color="Orange" Offset="0.2" /> <GradientStop Color="Yellow" Offset="0.4" /> <GradientStop Color="Green" Offset="0.6" /> <GradientStop Color="Blue" Offset="0.8" /> <GradientStop Color="Violet" Offset="1.0" /> </TextBlock.Foreground> <TextBlock.RenderTransform> </TextBlock.RenderTransform> </TextBlock>
<TextBlock Text="Rotated Text" FontSize="32" Foreground="Teal" Canvas.Top="300"> <TextBlock.RenderTransform> <RotateTransform Angle="90" /> </TextBlock.RenderTransform> </TextBlock>
<TextBlock Canvas.Top="400" FontSize="32" FontWeight="Bold" Foreground="Maroon" Text="Skewed Text"> <TextBlock.RenderTransform> </TextBlock.RenderTransform> </TextBlock> <TextBlock Canvas.Top="450"
FontSize="32" FontWeight="Bold" Foreground="Maroon" Text="Skewed Text"> <TextBlock.RenderTransform> </TextBlock.RenderTransform> </TextBlock>
</Canvas>
III.页面对应的 JS 文件代码(Default.aspx.js)
function createSilverlight() { Silverlight.createObjectEx({ source: "Page.xaml", parentElement: document.getElementById("SilverlightControlHost"), id: "SilverlightControl", properties: { width: "350", height: "1000",
version: "1.0", background: "white", isWindowless: "true", enableHtmlAccess: "true" }, events: {} }); } function onLoaded(sender, eventArgs) { }
8. 全屏支持功能 I. 页面代码(Default.aspx)
html xmlns="/1999/xhtml" >
II.Xaml 文件代码
<Canvas xmlns="/client/2007" xmlns:x="/winfx/2006/xaml" Width="300" Height="300" Loaded="onLoaded"> <MediaElement Name="media" Source="/mymtv123/许志安_光辉岁月.wmv"
Width="300" Height="300" MouseLeftButtonUp="onMouseLeftButtonUp" </Canvas>
/>
III.页面对应的 JS 文件代码(Default.aspx.js)
function createSilverlight() { Silverlight.createObjectEx({ source: "Page.xaml", parentElement: document.getElementById("SilverlightControlHost"), id: "SilverlightControl", properties: { width: "350", height: "500", version: "1.0", background: "white", isWindowless: "true", enableHtmlAccess: "true" }, events: {} }); } //双击事件 function onMouseLeftButtonUp(sender, mouseEventArgs) { //plugin.content.fullScreen = !plugin.content.fullScreen; var b=(new Date).getTime(),c=this._timeLastLeftButtonUp; this._timeLastLeftButtonUp=b; var a=c&&b-c<300; if(a) { //处理双击事件 this._timeLastLeftButtonUp=0; var plugin=sender.getHost(); plugin.content.fullScreen = !plugin.content.fullScreen; } else { //处理单击事件
} } var media; function onLoaded(sender, mouseEventArgs) { media = sender.findName("media"); //处理FullScreenChangeded事件 plugin = sender.getHost(); plugin
.content.onFullScreenChange = onFullScreenChanged; updateLayout(plugin.content.actualWidth, plugin.content.actualHeight); } function onFullScree


Silverlight入门教程(18).doc 将本文的Word文档下载到电脑

下一篇:镇江市2013届第一学期期中调研测试高三语文参考答案及评分标准

相关推荐
相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xxxxxx QQ:xxxxxx