摘要: XAML页面:<Grid x:Name="LaoutRoot"><StackPanel Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Orientation="Horizontal"> <TextBlock Text="书籍名称" Width="50" VerticalAlignment="Center... 阅读全文
posted @ 2009-10-14 13:30 若有似無 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 今天在做一个小的DEMO时,群里有位哥们问到了如何获取当前选中的datagrid的行数据,顺便测试了一下,发现SL的方式要比ASPX的方便很多!并且如果你绑定的数据是Entity的话,那么你可以根据你当前选中的datagrid获取到这个Entity,下面把代码贴上。注意触发的事件为:CurrentCellChanged后台代码:/// <summary> /// 获取datagrid当... 阅读全文
posted @ 2009-10-14 13:19 若有似無 阅读(6775) 评论(3) 推荐(0) 编辑
  2009年10月14日
摘要: 下面的示例将 Projection 属性设置为 PlaneProjection,以便旋转 StackPanel,就好像它在三维空间中一样。 <StackPanel Margin="35" Background="Gray"> <StackPanel.Projection> <PlaneProjection RotationX="-35" RotationY="-35"... 阅读全文
posted @ 2009-10-14 17:23 若有似無 阅读(1592) 评论(0) 推荐(0) 编辑
摘要: 其实给Silverlight程序设置背景图片很容易,代码如下:<Grid.Background> <ImageBrushImageSource="bg.png"Stretch="Fill"></ImageBrush></Grid.Background> 阅读全文
posted @ 2009-10-14 16:42 若有似無 阅读(837) 评论(1) 推荐(0) 编辑
  2009年9月17日
摘要: public void gridview_rowcomman(object sender,EventAge e){ GridView grid = (GridView)e.CommandSource; Label lblFID = (Label)grid.Rows[Convert.ToInt32(e.CommandArgument)].Cells[0].FindControl("lblFID");... 阅读全文
posted @ 2009-09-17 18:24 若有似無 阅读(255) 评论(0) 推荐(0) 编辑