博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2010年4月23日

摘要: VisualTreeHelper 成员提供可用于在 Silverlight 可视化树中遍历对象关系(以及子对象或父对象轴)的实用工具方法。VisualTreeHelper 类型公开以下成员。方法 名称说明FindElementsInHostCoordinates已重载。 检索一组对象,这些对象位于某一对象的坐标空间的指定点或 Rect 内。GetChild使用提供的索引,通过检查可视化树获取所提供... 阅读全文

posted @ 2010-04-23 14:01 小高好孩子 阅读(510) 评论(0) 推荐(0)

摘要: 用于 Silverlight 的 .NET Framework 类库HtmlPage 成员允许访问和操作浏览器的文档对象模型 (DOM)。 HtmlPage 类型公开以下成员。方法 名称说明PopupWindow打开一个弹出窗口。 RegisterCreateableType将某一托管类型注册为可通过 Content.services.createObject 和 Content.services... 阅读全文

posted @ 2010-04-23 13:51 小高好孩子 阅读(619) 评论(0) 推荐(0)

摘要: 相对路径与绝对路径, 本文来自:http://www.cnblogs.com/sutengcn/archive/2008/08/17/201993.html1,相对路径与绝对路径 文档路径类型一共有三种:绝对路径、根相对路径和文档相对路径。  绝对路径是包括服务器协议(在本例中为http协议)的完全路径,比如“洪恩在线——电脑乐园”,完全路径为:ht... 阅读全文

posted @ 2010-04-23 13:47 小高好孩子 阅读(1321) 评论(1) 推荐(0)

摘要: 主要问题是路径的设置,相对路径及绝对路径。示例代码:<UserControl x:Class="HyperlineButtonDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml... 阅读全文

posted @ 2010-04-23 13:42 小高好孩子 阅读(888) 评论(0) 推荐(0)

摘要: 示例代码如下://Create the source stringstring s = "Hello";//Create the binding descriptionBinding b = new Binding("");b.Mode = BindingMode.OneTime;b.Source = s;//Attach the binding to the targetMyText.SetBi... 阅读全文

posted @ 2010-04-23 13:14 小高好孩子 阅读(1156) 评论(0) 推荐(0)

摘要: 今天在编写代码的时候要用到一个功能,就是点击某一个Rectangle时判断背景色并作相应的处理,结果Fill对象不能直接得到背景色的颜色值,网上找资料后终于解决了问题,方法如下:Color seatSelectedColor = Colors.Red;Rectangle seat = seatContent.FindName("X" + x.ToString() + "Y" + y.ToStrin... 阅读全文

posted @ 2010-04-23 13:12 小高好孩子 阅读(554) 评论(0) 推荐(0)

摘要: 基本图形:Rectangle及Ellipse此示例为了测试RadiusX,RadiusY这两个属性的具体含义<UserControl x:Class="ShapeDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.c... 阅读全文

posted @ 2010-04-23 13:00 小高好孩子 阅读(148) 评论(0) 推荐(0)

摘要: ToggleButton:<UserControl x:Class="ToggleButtonDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http:... 阅读全文

posted @ 2010-04-23 12:44 小高好孩子 阅读(171) 评论(0) 推荐(0)

摘要: Image:<UserControl x:Class="ImageDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.micr... 阅读全文

posted @ 2010-04-23 12:42 小高好孩子 阅读(202) 评论(0) 推荐(0)

摘要: CheckBox的使用:<UserControl x:Class="CheckBoxDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://sch... 阅读全文

posted @ 2010-04-23 12:40 小高好孩子 阅读(134) 评论(0) 推荐(0)

摘要: 容器类控件-Canvas:常用属性有Canvas.LeftCanvas.TopCanvas.ZIndex后台编码设置以上属性语法格式为:Canvas.SetLeft(Element对象,值)Canvas.SetTop(Element对象,值)Canvas.SetZIndex(Element对象,值)示例代码:<UserControl x:Class="CanvasDemo.MainPage"... 阅读全文

posted @ 2010-04-23 12:38 小高好孩子 阅读(228) 评论(0) 推荐(0)

摘要: 关于Button综合示例:前台代码:<UserControl x:Class="ButtonDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http:/... 阅读全文

posted @ 2010-04-23 12:34 小高好孩子 阅读(172) 评论(0) 推荐(0)

摘要: TextBlock:前台代码<UserControl.Resources> <Style TargetType="TextBox"> <Setter Property="Width" Value="120"></Setter> </Style> <Style TargetType="TextBlock" x:Key="lbl"&g... 阅读全文

posted @ 2010-04-23 12:32 小高好孩子 阅读(183) 评论(0) 推荐(0)