2011年8月22日

摘要: 在WPF中获取程序运行路径有以下几个方法; 1. Environment.CurrentDirectory :"c:\bin\Debug\" 2: AppDomain.CurrentDomain.BaseDirectory 3. AppDomain.CurrentDomain.SetupInf... 阅读全文
posted @ 2011-08-22 22:58 haiyantai 阅读(288) 评论(0) 推荐(0)
 
摘要: using System;using System.Windows;using System.Windows.Input; namespace xiaohai.TextInput{ class Example : Application { [STAThread] public static vo... 阅读全文
posted @ 2011-08-22 16:32 haiyantai 阅读(244) 评论(0) 推荐(0)
 
摘要: 窗口是程序的主要交互界面,窗口的位置与大小往往不容忽视。在WPF中,width与height属性是由Window继承自FramworkElement对象。是设备无关单位(1/96英寸),它与你的分辨率及DPI设置有关,如果程序中没有显示的指定它们的值,默认值为NaN(非数字)。 可以使用Actual... 阅读全文
posted @ 2011-08-22 16:26 haiyantai 阅读(247) 评论(0) 推荐(0)
 
摘要: Window类的继承树: Object ---DispatcherObject(abstract) ---- Application----DependencyObject---Visual(abstract)---UIElement---Control--Window .在一个程序中你只能创建一... 阅读全文
posted @ 2011-08-22 15:37 haiyantai 阅读(429) 评论(0) 推荐(0)