深入探索Silverlight与ASP.NET的集成应用
1. Silverlight内容区域的操作与动画效果
在Web开发中,我们经常需要对Silverlight内容区域进行定位、大小调整以及显示和隐藏等操作。以下是相关的代码实现:
// Get the Silverlight container, and position it.
HtmlElement silverlightControl =
HtmlPage.Document.GetElementById("silverlightControlHost");
silverlightControl.SetStyleAttribute("left", targetLeft.ToString() + "px");
silverlightControl.SetStyleAttribute("top", targetTop.ToString() + "px");
// Resize the Silverlight container to match the actual page size.
silverlightControl.SetStyleAttribute("width", this.Width + "px");
silverlightControl.SetStyleAttribute("height", this.Height + "px");
上述代码通过获取Silverlight容器元素,并设置其 left 、 top 、 width 和
超级会员免费看
订阅专栏 解锁全文
38

被折叠的 条评论
为什么被折叠?



