上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 23 下一页
摘要: 代码:/// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App : Application { public App() { Debug.WriteLine("App constructor"); this.Startup += new StartupEventHandler(App_Startup); } void App_Startup(object... 阅读全文
posted @ 2012-07-02 14:00 xiaokang088 阅读(5863) 评论(0) 推荐(0) 编辑
摘要: WPF 单例启动的例子,记一下。参考 WPF Single Instance workaround关键代码:namespace 你的命名空间{ public class Startup { [STAThread] public static void Main(string[] args) { SingleInstanceApplicationWrapper wrapper = new SingleInstanceApplicationWrapper(); wrapper.Run(args); ... 阅读全文
posted @ 2012-07-02 11:30 xiaokang088 阅读(1755) 评论(0) 推荐(2) 编辑
摘要: 今天看到了老赵的一片博客:编写一个“绑定友好”的WPF控件文章里面遇到的问题,蛮有意思,后面的评论,非常精彩,没看过的,推荐看一下。由于我也做过类似的需求,所以,贴出我当时的做法和现在的想法,仅仅是笔记,没有其他意思。当时的需求类似这样子,实际做的效果当然比这个漂亮的多。看到这个UI的第一反应就是,封装一个控件,把slider包进去,很简单的吧。当时的做法,在CS代码里面封装几个DP,绑定就完事儿了呀。<UserControl x:Class="WpfControlTest.UCSlider" xmlns="http://schemas.microsoft. 阅读全文
posted @ 2012-06-29 16:23 xiaokang088 阅读(3023) 评论(3) 推荐(2) 编辑
摘要: ApplicationSettingsBase 阅读全文
posted @ 2012-06-28 16:23 xiaokang088 阅读(2286) 评论(2) 推荐(2) 编辑
摘要: 类似Winform的搞法,可以把资源放到Resources.resx中。1.字符串打开这个编辑器后,输入Name和Value就可以了。CS代码里面,很简单的调用:var title = WpfResource2.Properties.Resources.IDS_TEST_TITLE;如果要用在XAML中,需要把Access Modifier改为public,原来是Internal。XAML如下:1 <Window x:Class="WpfResource2.MainWindow"2 xmlns="http://schemas.microsoft.com/wi 阅读全文
posted @ 2012-06-28 13:44 xiaokang088 阅读(8945) 评论(0) 推荐(3) 编辑
摘要: JumpList 阅读全文
posted @ 2012-06-27 11:28 xiaokang088 阅读(314) 评论(0) 推荐(1) 编辑
摘要: C# EventLog 阅读全文
posted @ 2012-06-26 14:23 xiaokang088 阅读(1311) 评论(0) 推荐(0) 编辑
摘要: HttpWebRequest 阅读全文
posted @ 2012-06-08 10:02 xiaokang088 阅读(5579) 评论(0) 推荐(0) 编辑
摘要: In XAML you specify this as a string. In code,pass the identifier (a RoutedEvent value.) The onl 阅读全文
posted @ 2012-05-26 13:12 xiaokang088 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 官网http://snoopwpf.codeplex.com/Why Aren’t My Apps Showing Up in the App Chooser?One question that comes up all the time is the situation where the application you are trying to Snoop, isn't appearing in the application chooser (i.e. the combo box that lists the processes you can Snoop). This is 阅读全文
posted @ 2012-05-21 17:39 xiaokang088 阅读(807) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 23 下一页