上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 24 下一页
摘要: 在wp/silverlight/wpf也会经常看到控件模板。经常混淆的应该是DataTemplate和ControlTemplate,本篇文章就来谈谈两件衣服DataTemplate和ControlTemplate的关系。本篇文章主要会以wpf控件为主,以便最后的源码大家都可以打开。一、ContentControl中的DataTemplate在开始之前,我们先去看一下ContentControl的定义,无论在wp还是在wpf中其都有下面两个属性: public object Content { get; set; } public DataTemplate ContentTemplat... 阅读全文
posted @ 2013-08-10 22:44 haiziguo 阅读(13553) 评论(7) 推荐(19) 编辑
摘要: ContentControl有两个属性: // 摘要: // 获取或设置 System.Windows.Controls.ContentControl 依赖项属性的值。 // // 返回结果: // 一个包含控件内容的对象。默认值为 null。 public object Content { get; set; } // // 摘要: // 获取或设置用于显示 System.Windows.Controls.ContentControl 内容的数... 阅读全文
posted @ 2013-07-29 17:07 haiziguo 阅读(1252) 评论(0) 推荐(0) 编辑
摘要: 动画目标:必须是依赖属性。可以用于Double,Color,Point,Object类型。对应的动画类后面加Animation,下面代码演示旋转360°。 void OnButtonClick(object sender, RoutedEventArgs args) { Button btn = sender as Button; //在x-y二维空间围着一个点旋转的变换 ... 阅读全文
posted @ 2013-07-29 13:22 haiziguo 阅读(598) 评论(0) 推荐(0) 编辑
摘要: // // 摘要: // 使用提供的元素和变换初始化 System.Windows.Media.Imaging.WriteableBitmap 类的新实例。 // // 参数: // element: // 要在位图中呈现的所需元素。 // // transform: // 用户要在绘制到位图中之前的最后一步中应用到元素的变换。如果您希望位图将它的变换考虑在内,则这对于您特别有意义。此值可以为 null。 /... 阅读全文
posted @ 2013-07-29 09:57 haiziguo 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 7月第三周 wp8培训视频 http://www.devdiv.com/neic_windows_phone_-thread-193840-1-1.htmlsilverlight资源的解释 http://manaspatnaik.com/blog/index.php/technology/silverlight-4/resource-in-silverlight-a-brief-overview-part-1-resource-files/822线程池 http://www.cnblogs.com/wildman/archive/2008/08/22/1274170.htmlwp中使用dock 阅读全文
posted @ 2013-07-29 09:10 haiziguo 阅读(417) 评论(0) 推荐(0) 编辑
摘要: public class HttpClass { internal static HttpWebRequest _httpWebRequest; public static void Request() { _httpWebRequest = null; _httpWebRequest = (HttpWebRequest)WebRequest.Create("http://wcf.open.cnblogs.com/blog/sitehome/paged/1/2"); _httpW... 阅读全文
posted @ 2013-07-24 15:02 haiziguo 阅读(1913) 评论(0) 推荐(0) 编辑
摘要: public class PersistHelper { public static string lastClickTime = "last_time"; public static DateTime defaultTime = new DateTime(1977, 1, 1); /// /// 查看独立存储是否有指定key的值,如果有的话 获取其值,没有的话返回默认值 /// /// 类型 /// 键 /// /// public... 阅读全文
posted @ 2013-07-23 20:58 haiziguo 阅读(218) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Linq;using System.Text;using System.Threading.Tasks;namespace WpfApplication2{ /// /// 继承INotifyPropertyChanged接口,当值发生改变时,向客户端发出通知。 /// public class SliderClass : INotifyPropertyChanged { p... 阅读全文
posted @ 2013-07-23 20:43 haiziguo 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 注意Padding和Margin分别是向内和向外的距离,BorderThickness是自身的线条。也就是使用BorderBrush修饰的部分。本文主要区别Padding和BorderThickness。 阅读全文
posted @ 2013-07-13 23:17 haiziguo 阅读(1348) 评论(0) 推荐(0) 编辑
摘要: 一、多态中的变量多态是一个对象两种形态,class Person{ int num=3;}class Work{ int num=4;}Person p=new Worker ();p.num的结果为3二、多态的方法class Fu{ void show() { System.out.println("fu run"); }}class Zi extends Fu{ void show() { System.out.println("zi run"); }}class MethodDemo{ public static... 阅读全文
posted @ 2013-06-07 02:38 haiziguo 阅读(193) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 24 下一页