摘要: 我在wpf项目中手写了一个自定义控件,运行得相当的正常,后续调用时,反复遇到问题,前前后后折腾了好几次 代码 public ExtendCombox() { Loaded += (e, s) => { textbox.TextChanged += Textbox_TextChanged; textb 阅读全文
posted @ 2022-09-26 12:02 小可可可 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 问题: 在WPF中 创建了资源字典来写自定义控件 涉及到Button,CheckBox等一系列带Command属性的操作时,需要将命令绑定到我们的代码中,这时你会想到查找器,DataContext等为按钮设置绑定,特别是在ItemsControl等拥有DataTemplate等多重绑定的,最为烦人 阅读全文
posted @ 2022-06-28 11:24 小可可可 阅读(385) 评论(0) 推荐(0) 编辑
摘要: <DataGridTemplateColumn Header="操作" Width="*" SortMemberPath="ModificateDate" > <DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Orien 阅读全文
posted @ 2021-11-11 18:35 小可可可 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 如何在wpf的c#代码中实现简单样式?而不是通过xaml进行实现? xaml其实也是在实现具体的类,xaml中能写出来的,通过c#代码肯定也能写出来,有的时候我们需要在viewmodel等代码中实现,简单的代码实现如下: System.Windows.Style style = new System 阅读全文
posted @ 2021-10-20 16:01 小可可可 阅读(612) 评论(0) 推荐(0) 编辑