心如止水

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 ··· 9 下一页

2012年4月6日

摘要: 原文地址:http://www.digdes.com/art/136-wpf-routed-commandsArticlesWPF Routed Commands: Overview and ExamplesThis article focuses on such WPF capability as routed commands, their structure and ways of using them. Apart from this, here we will describe benefits for the developer who use routed commands an 阅读全文
posted @ 2012-04-06 15:32 cutebear 阅读(787) 评论(0) 推荐(0) 编辑

2012年3月15日

摘要: 这是最近写的一个密码管理工具,可以通过更改配置文件来切换到中文界面。http://files.cnblogs.com/bear831204/PasswordManager.zip下面是更新后的一个版本:http://files.cnblogs.com/bear831204/PasswordManager_V2.0.zip 阅读全文
posted @ 2012-03-15 11:06 cutebear 阅读(231) 评论(1) 推荐(0) 编辑

2012年3月12日

摘要: 今天用msdn上的locbaml工具,出现一个错误Could not find *.resources.dll or one of its dependencies. An attempt was made to load a program with an incorrect format然后在这里找到了解决办法:http://michaelsync.net/2010/03/01/locbaml-for-net-4-0这里保存了个副本:http://files.cnblogs.com/bear831204/locbaml_sdk(.NET4).zip 阅读全文
posted @ 2012-03-12 17:31 cutebear 阅读(533) 评论(0) 推荐(0) 编辑

2012年2月27日

摘要: 可以编辑保存一个代码片断。download at http://files.cnblogs.com/bear831204/CodeSnippetEditor.zip. 阅读全文
posted @ 2012-02-27 10:41 cutebear 阅读(185) 评论(0) 推荐(0) 编辑

2012年1月12日

摘要: xaml:<Window x:Class="TreeViewDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="550" Width="825" xmlns:local="clr-nam 阅读全文
posted @ 2012-01-12 13:14 cutebear 阅读(777) 评论(1) 推荐(0) 编辑

2011年12月28日

摘要: 名词解释DLR: dynamic language runtime.refer to this article:http://msdn.microsoft.com/en-us/vstudio/ff800651.aspx下面是一个简单的实现,会动态的创建需要的属性:class Program { static void Main(string[] args) { dynamic dynamicProperties = new MyDynamicObject(); try { ... 阅读全文
posted @ 2011-12-28 15:27 cutebear 阅读(250) 评论(0) 推荐(0) 编辑

2011年12月23日

摘要: check out the code.http://files.cnblogs.com/bear831204/BackgroundWorkerDemo.zip 阅读全文
posted @ 2011-12-23 16:00 cutebear 阅读(141) 评论(0) 推荐(0) 编辑

2011年11月1日

摘要: Dispatcher.Invoke是同步执行,msdn描述:Executes the specified delegate with the specified arguments synchronously on the thread the Dispatcher is associated with.返回值是object, 是被调用的委托的返回值,如果该委托没有返回值,则为null。它有好几个重载方法,下面是其中之一:public Object Invoke( Delegate method, paramsObject[] args)Invoke is a synchronous oper 阅读全文
posted @ 2011-11-01 16:44 cutebear 阅读(3896) 评论(0) 推荐(0) 编辑

2011年9月19日

摘要: http://blogs.msdn.com/b/jgoldb/archive/2008/02/04/finding-memory-leaks-in-wpf-based-applications.aspx很好的工具: .Net memory profiler. 阅读全文
posted @ 2011-09-19 15:00 cutebear 阅读(224) 评论(0) 推荐(0) 编辑

2011年9月5日

摘要: 1. FrameworkTemplate2. ControlTemplate - 控件模板允许您指定控件的可视结构。public class ControlTemplate : FrameworkTemplate {...}3. DataTemplate - 数据模板描述数据对象的可视结构。public class DataTemplate : FrameworkTemplate {...}作用于所有继承自ContentControl的内容控件的ContentTemplate属性和所有继承自ItemsControl的列表控件的ItemTemplate属性,即用于设置控件的数据内容。官方MSDN 阅读全文
posted @ 2011-09-05 11:20 cutebear 阅读(3638) 评论(0) 推荐(1) 编辑

2011年8月31日

摘要: ILSpy is the open-source .NET assembly browser and decompiler.Development started after Red Gate announced that the free version of .NET Reflector would cease to exist by end of February 2011.下载地址:http://wiki.sharpdevelop.net/ilspy.ashx 阅读全文
posted @ 2011-08-31 11:03 cutebear 阅读(439) 评论(0) 推荐(0) 编辑

2011年8月29日

摘要: 1. 下面的代码,1和2有什么不同:void Test() { // 1. try { } catch (Exception) { } // 2. try { } catch { } }如果用ildasm查看:View Code .method private hidebysig instance void Test() cil managed{ // Code size 22 (0x16) .maxstack 1 ... 阅读全文
posted @ 2011-08-29 11:41 cutebear 阅读(343) 评论(0) 推荐(0) 编辑

2011年8月24日

摘要: const 关键字用于修改字段或局部变量的声明。 它指定字段或局部变量的值是常数,不能被修改。 例如: public const double gravitationalConstant = 6.673e-11; 只有 C# 内置类型(System.Object 除外)可以声明为 const。 下表列出了C# 内置类型: boolSystem.BooleanbyteSystem.BytesbyteSystem.SBytecharSystem.ChardecimalSystem.DecimaldoubleSystem.DoublefloatSystem.SingleintSystem.Int32 阅读全文
posted @ 2011-08-24 17:27 cutebear 阅读(404) 评论(0) 推荐(0) 编辑

摘要: 我们基本上可以使用Windows API函数ShowWindowAsync方法来正常化/最大化/最小化另一应用程序。private void button1_Click(object sender, EventArgs e) { // 返回写字板程序的句柄 IntPtr hWnd = FindWindow("Notepad", "Untitled - Notepad"); if (!hWnd.Equals(IntPtr.Zero)) { // SW_SHOWMAX... 阅读全文
posted @ 2011-08-24 14:45 cutebear 阅读(2362) 评论(0) 推荐(0) 编辑

2011年8月23日

摘要: 品味细节,深入.NET的类型构造器转载自:http://msdn.microsoft.com/zh-cn/dd368012.aspx1 引言今天Artech 兄在《关于 Type Initializer和 BeforeFieldInit的问题,看看大家能否给出正确的解释 》一文中让我们认识了一个关于类型构造器调用执行的有趣示例,其中也相应提出了一些关于beforefieldinit 对于类型构造器调用时机的探讨,对于我们很好的理解类型构造器给出了一个很好的应用实践体验。作为补充,本文希望从基础开始再层层深入,把《关于Type Initializer 和 BeforeFieldInit 的问题, 阅读全文
posted @ 2011-08-23 17:38 cutebear 阅读(749) 评论(1) 推荐(1) 编辑

上一页 1 2 3 4 5 6 ··· 9 下一页