随笔分类 -  c#

上一页 1 2

wpf程序报"The name 'InitializeComponent' does not exist in the current context"的
摘要:stackOverFlow 's answerI've encountered this a couple times and keep forgetting what causes it. I ran into this when I renamed the namespace on my code behind file but not in my XAML.So check if you've done the same. They need to match since they are both part of a partial classnamespace 阅读全文

posted @ 2013-06-28 16:20 齐文宣 阅读(832) 评论(0) 推荐(0)

解决---请求“System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的权限已失败。
摘要:1:项目属性-----应用程序:清单为Properties\app.manifest2: 修改安全选项:启用ClickOnce安全设置,选择这是安全可信的应用程序来源网页: http://www.silverlightchina.net/html/study/WPF/2012/0315/14531.html 阅读全文

posted @ 2013-06-26 21:36 齐文宣 阅读(3015) 评论(1) 推荐(0)

调试时出现 'The breakpoint will not currently be hit. No symbols have been loaded for this document' 当前断电不会被命中,符号未被加载的解决方法
摘要:stackOverFlow的有效答案:I had the same problem, I was debugging my project, and i had to right click the project and select "new debug instance". I only needed to do this once, then after that it worked as normal.方法是:右击项目选择 : 启动新实例原帖地址 :http://stackoverflow.com/questions/2301216/the-breakpoint- 阅读全文

posted @ 2013-06-12 14:08 齐文宣 阅读(1140) 评论(0) 推荐(0)

用LINQ对Dictionary排序
摘要:代码如下 : static void Main(string[] args) { Dictionary<int, int> di = new Dictionary<int, int>(); di.Add(9, 1); di.Add(0, 6); di.Add(2, 8); var sortedDict = (from entry in di orderby entry.Key ascending select entry) .T... 阅读全文

posted @ 2013-03-25 00:26 齐文宣 阅读(304) 评论(0) 推荐(0)

在tablepage的datagridview中,加上按列值搜索相应记录的方法
摘要:要实现的效果是:tablepage中有一个datagridview,当用户鼠标点在datagridview列标题时,浮现一个textbox,比如当前列标题是姓名,那么用户输入张三,datagridview张三那行就被定位,变成selected状态 。具体代码如下:首先在窗体构造函数加2个delegate InitializeComponent(); dgv_compare.MouseHover+=new EventHandler(dgv_compare_MouseHover); dgv_compare.MouseLeave+=n... 阅读全文

posted @ 2013-02-03 13:34 齐文宣 阅读(285) 评论(0) 推荐(0)

上一页 1 2

导航