2025年9月12日
摘要: RelativeSource 类在 WPF 中提供了以下几种模式: RelativeSource Self:指定当前元素作为相对源。可以在当前元素的属性中绑定到自身的属性。示例: <TextBlock Text="{Binding Text, RelativeSource={RelativeSour 阅读全文
posted @ 2025-09-12 09:44 咖啡加点盐 阅读(24) 评论(0) 推荐(0)
摘要: <TextBlock Text="{Binding Source={StaticResource list},Path=[1]}" 阅读全文
posted @ 2025-09-12 09:40 咖啡加点盐 阅读(3) 评论(0) 推荐(0)
  2025年9月11日
摘要: Resources["lianjie"]; 阅读全文
posted @ 2025-09-11 15:43 咖啡加点盐 阅读(6) 评论(0) 推荐(0)
  2025年9月10日
摘要: 在用户控件构造函数里加个判断 if (DesignerProperties.GetIsInDesignMode(this)){return;} 阅读全文
posted @ 2025-09-10 16:18 咖啡加点盐 阅读(4) 评论(0) 推荐(0)
  2024年4月25日
摘要: <DataGridTemplateColumn Width="50" Header="选择"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ContentControl> <ContentControl.Style> <Style Ta 阅读全文
posted @ 2024-04-25 19:48 咖啡加点盐 阅读(70) 评论(0) 推荐(0)
  2024年3月25日
摘要: System.Windows.Application.Current.Dispatcher.Invoke(new Action(() => {MessageBox.Show("FTP服务器链接失败!"); })); 阅读全文
posted @ 2024-03-25 15:25 咖啡加点盐 阅读(51) 评论(0) 推荐(0)
  2024年2月29日
摘要: 在csproj中的 <PropertyGroup>节点里添加 <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids><Warn 阅读全文
posted @ 2024-02-29 11:02 咖啡加点盐 阅读(87) 评论(0) 推荐(1)
  2024年1月12日
摘要: https://blog.csdn.net/qq_40197926/article/details/125678007 不能为UserControl 设置 DataContext而应该为 FrameworkElement设置DataContext将Control1中的 this.DataContex 阅读全文
posted @ 2024-01-12 14:49 咖啡加点盐 阅读(153) 评论(0) 推荐(0)
  2024年1月9日
摘要: .Net为我们提供了众多的泛型集合。比如, Stack<T>先进后出, Queue<T>先进先出, List<T>集合元素可排序,支持索引, LinkedList<T>,双向链表的泛型实现,不支持索引; ISet<T>不允许被复制,他有2个实现,一个是HashSet<T>,不维持集合元素的排序,另一 阅读全文
posted @ 2024-01-09 10:39 咖啡加点盐 阅读(130) 评论(0) 推荐(0)
  2023年11月15日
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Windows.Contr 阅读全文
posted @ 2023-11-15 13:53 咖啡加点盐 阅读(87) 评论(0) 推荐(0)