会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Jane&Coding
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
下一页
2016年9月5日
C# Tips: String Convert to byte[]
摘要: string s = "test"; //Convert from string to byte[] //byte[] bytes = Convert.FromBase64String(s); byte[] bytes = Encoding.UTF8.GetBytes(s); //Convert f
阅读全文
posted @ 2016-09-05 17:56 Jane&Coding
阅读(327)
评论(0)
推荐(0)
2016年8月3日
WPF Tips: 拖拽文件打开
摘要: MainWindow.xaml MainWindow.xaml.cs
阅读全文
posted @ 2016-08-03 10:12 Jane&Coding
阅读(190)
评论(0)
推荐(0)
WPF Tips: 读取命令行参数
摘要: App.xml.cs App.xml
阅读全文
posted @ 2016-08-03 09:56 Jane&Coding
阅读(355)
评论(0)
推荐(0)
2016年5月17日
WPF: 菜单(Menu)中添加最近打开文件清单(Recent Files)
摘要: 参考: http://www.codeproject.com/Articles/23731/RecentFileList-a-WPF-MRU 注意: 主要用到RecentFileList.cs文件。需要在Init(初始化)中添加点击Menu的事件处理方法;Open, Save和SaveAs中调用In
阅读全文
posted @ 2016-05-17 16:45 Jane&Coding
阅读(742)
评论(2)
推荐(0)
2016年4月28日
WPF Tips: ListBox显示ItemsSource中对象的属性
摘要: 与ListBox的ItemsSource为一个List<MyClass>, 但只想在ListBox中显示MyClass的属性MyName。 cs: this.ListBox1.ItemsSource = MyClassList; this.ListBox1.DisplayMemberPath = "
阅读全文
posted @ 2016-04-28 10:42 Jane&Coding
阅读(650)
评论(0)
推荐(0)
2016年4月27日
WPF Tips: PropertyChanged为null
摘要: 当xaml中的一个element binding一个property时,出现PropertyChanged is null的原因(目前遇到的): 1. 没有设置将element(或上级)的DataContext。 2. Property不是public(血泪的教训)。 以后如遇到新情况会继续更新
阅读全文
posted @ 2016-04-27 15:17 Jane&Coding
阅读(2207)
评论(2)
推荐(1)
2016年4月25日
WPF Tips: TextBox实时更新Binding的Property
摘要: 因为当点击toolbar中button的时候textbox不会lost focus,也就不会更新binding的property。为了能在点击toolbar的时候访问property。 这样在修改textbox中内容的时候,property的值会实时更改。
阅读全文
posted @ 2016-04-25 15:47 Jane&Coding
阅读(2073)
评论(0)
推荐(0)
2016年3月30日
WPF Tips: 等宽字体
摘要: 想在textbox中字母与空格占用的宽度相同,需要设置 FontFamily="Courier New"
阅读全文
posted @ 2016-03-30 18:36 Jane&Coding
阅读(1175)
评论(0)
推荐(1)
WPF Tips: Listbox SelectionChanged触发前的选项
摘要: 想在Listbox的SelectionChanged事件触发时对之前的选项进行处理。但是listbox没有previewSelectionChanged事件。 解决办法: 1. Validation 因为要处理的项在TextBox中,所以可以给TextBox添加一个Validation。但是由于Te
阅读全文
posted @ 2016-03-30 18:06 Jane&Coding
阅读(3874)
评论(0)
推荐(0)
2016年3月29日
WPF Tips: 高亮显示在listbox中第一个与textbox内容匹配的项
摘要: 在textbox中输入内容,同时在listbox中高亮以目前textbox内容开头的项。 public String SearchText { get; set; }
阅读全文
posted @ 2016-03-29 14:49 Jane&Coding
阅读(670)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告