1 2 3 4 5 ··· 10 下一页
摘要: 如图样:View结构MainView(MainViewModel)|---Guide1View(Guide1ViewModel)|---Guide2View(Guide2ViewModel) |---Guide2_1View1(Guide2_1ViewModel) |---Guide2_1Vie... 阅读全文
posted @ 2015-04-22 12:10 SubmarineX 阅读(1463) 评论(0) 推荐(0) 编辑
摘要: 记录了一些感觉比较用得到的tips用于随时查看。要想看完整的的内容还是阅读《Visual Studio 程序员箴言》,不过有些内容我在新版本的VS里没能实现,或者有替代方案了。避免意外复制一个空白行:工具→选项→文本编辑器→所有语言→常规,取消勾选“没有选定内容时对空行应用剪切或复制命令”;通过剪切... 阅读全文
posted @ 2014-11-10 23:12 SubmarineX 阅读(857) 评论(0) 推荐(0) 编辑
摘要: 使用以下代码,当TextBlock文本过长,引起Button的显示位置在可见区域以外: 1 5 6 7 8 9 10 【END】 阅读全文
posted @ 2014-11-05 19:21 SubmarineX 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 原文:《模拟MessageBox》Posted on 2014/01/07================================================================================这段时间在用WPF开发项目。界面采用的是类似Win8系统的Metr... 阅读全文
posted @ 2014-09-12 08:04 SubmarineX 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 原文:《使用log4net,没有日志文件生成》Posted on 2014/06/12================================================================================log4net主页:Apache log4net: H... 阅读全文
posted @ 2014-09-12 08:02 SubmarineX 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 原文:《User Settings in WPF》Posted on2014/04/09================================================================================介绍参看:How To: Write User Se... 阅读全文
posted @ 2014-09-12 08:01 SubmarineX 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 原文:《Visual Studio工具》Posted on 2014/03/13================================================================================Editor Guidelines为编辑器增加垂直辅助线,用... 阅读全文
posted @ 2014-09-12 08:00 SubmarineX 阅读(2068) 评论(0) 推荐(0) 编辑
摘要: 。 1 // Summary: 2 // A timer that is integrated into the System.Windows.Threading.Dispatcher queue 3 // which is processed at a specified interval of time and at a specified priority. 4 DispatcherTimer timer = new DispatcherTimer(); 5 // Summary: 6 // Occurs when the timer interval has e... 阅读全文
posted @ 2013-09-06 14:30 SubmarineX 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 最初使用一个Rectangle,并设置Z值来捕捉MouseLeftButtonDown事件,但是不管在它之上或是之下的TextBox都无法用鼠标进入编辑状态。给Window添加MouseLeftButtonDown事件:1 .1 private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)2 {3 this.DragMove();4 }、 阅读全文
posted @ 2013-09-04 17:20 SubmarineX 阅读(243) 评论(0) 推荐(0) 编辑
摘要: WPF Popup: How to put a border around the popup?通过设置 Border 的 margin 来为阴影留出位置,并设置 Popup:AllowsTransparency="True"。 1 2 3 4 5 6 7 ...Content... 8 9 10 。 阅读全文
posted @ 2013-09-03 17:26 SubmarineX 阅读(1563) 评论(0) 推荐(0) 编辑
摘要: WPF: How to make the TextBox/TextBlock/Label show "xxx..." if the text content too long?设置 属性 “TextTrimming”:=========================================... 阅读全文
posted @ 2013-09-03 16:35 SubmarineX 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 原文:C# Tips & Tricks:Weak References - When and How to Use ThemSometimes you have an object which is very large and needed multiple times, but not constantly, throughout your application. For example a huge lookup table, or the contents of a large file you need in memory for some algorithm. To wo 阅读全文
posted @ 2013-08-20 16:53 SubmarineX 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 看一个例子:1 interface IFoo2 {3 string Message { get; }4 }则,1 IFoo obj = new IFoo("abd");将会报错:接口不能被实例化。如果: 1 class Foo : IFoo 2 { 3 readonly string name; 4 public Foo(string name) 5 { 6 this.name = name; 7 } 8 string IFoo.Message 9 {10 get11 {12 ... 阅读全文
posted @ 2013-07-25 17:17 SubmarineX 阅读(7160) 评论(0) 推荐(1) 编辑
摘要: ComboBoxCustomizing WPF combo box styleNavigationBuild Your Own Navigation Bar for Data Navigation in WPFWPF NavigationTreeListViewWPF TreeListView Controlhttp://www.codeproject.com/Articles/16009/A-Much-Easier-to-Use-ListViewTreeViewSimplifying the WPF TreeView by Using the ViewModel Pattern 阅读全文
posted @ 2013-07-12 12:12 SubmarineX 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 为了学习自定义控件,就想看看WPF基本元素的代码。使用到工具.NET Reflector。 System.Windows.Controls 命名空间在PresentationFramework.dll中。 Control Class继承关系。 Q:Where can I find System.Windows.Controls.dll and System.Windows.Controls.Data.dll ======================================================== 完整的操作:File -> Open Assembly Li... 阅读全文
posted @ 2013-07-05 12:20 SubmarineX 阅读(1067) 评论(0) 推荐(1) 编辑
摘要: 原文:The VisualStateManager and TriggersAuthor:Carole Snyder Silverlight 推出了可视化状态管理器(Visual State Manager ),它使得控件模版作者更方便地指定依赖可视化状态的控件外观。WPF Toolkit附带了一个可视化状态管理器(Visual State Manager ),WPF 的下个版本将会加入 VSM。可以理解地,VisualStateManager 的引进带来了问题:何时使用 VSM 代替触发器,何时使用触发器会更适合。本博文尝试解决这个问题:更多对如何使用可视化状态管理器(VisualStat. 阅读全文
posted @ 2013-06-26 13:28 SubmarineX 阅读(1677) 评论(1) 推荐(0) 编辑
摘要: 效果如下:用到扩展工具:NestIn可以通过 VS->工具->扩展管理器->联机库 搜索安装。In WPF: How to create resource dictionary files like MahApps.Metro?Nesting Files in VisualStudio 阅读全文
posted @ 2013-06-25 17:38 SubmarineX 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 原文:Creating “Cool” Buttons with Expression BlendAuthor:Alex 在本文中,我们将考虑在Expression Blend用几种方法来创建酷炫的凝胶状按钮。如果你看到 Expression Blend 或 Visual Studio 中的 WPF 默认外观的 Button,你会发现它一点也不酷。它仍旧是过时的chrome 样子的按钮控件,然而 Expression Blend 和 Windows Presentation Foundation (WPF) 不仅具有基本功能而且能够提升用户体验(User eXperience,UX)。所以为了. 阅读全文
posted @ 2013-06-24 16:25 SubmarineX 阅读(1699) 评论(3) 推荐(0) 编辑
摘要: A guide to cleaner XAML with custom namespaces and prefixes (WPF/Silverlight)XAML Namespaces and Namespace Mapping for WPF XAML 阅读全文
posted @ 2013-06-09 17:26 SubmarineX 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1 <TextBlock>2 <Hyperlink 3 Click="ForgetPassword">4 忘记密码5 </Hyperlink>6 </TextBlock>—EOF— 阅读全文
posted @ 2013-06-05 15:18 SubmarineX 阅读(369) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 10 下一页