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

2010年4月23日

摘要: 今天在编写代码的时候要用到一个功能,就是点击某一个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)

2010年4月22日

摘要: 关于Silverlight的基本控件:TextBlock:普通文本 示例代码 <Grid x:Name="LayoutRoot" Background="White"> <Grid.RowDefinitions> <RowDefinition></RowDefinition> <RowDefinition></RowDefiniti... 阅读全文

posted @ 2010-04-22 18:53 小高好孩子 阅读(518) 评论(0) 推荐(0)