随笔分类 -  C#学习随笔 / WPF学习随笔

WPF相关学习随笔
摘要:Application.Current.Dispatcher.Invoke(new Action(()=> { //修改主线程UI绑定属性代码 Nodes = new ObservableCollection<Node>(list); })); //异步模式 Application.Current. 阅读全文
posted @ 2024-05-27 12:37 青丝·旅人 阅读(312) 评论(0) 推荐(0) 编辑
摘要:原文连接 一、添加一個FrameworkElement的代理 <Window.Resources> <FrameworkElement x:Key="ProxyElement" DataContext="{Binding}"/> </Window.Resources> 二、用一個不可見的Conten 阅读全文
posted @ 2024-01-24 17:27 青丝·旅人 阅读(194) 评论(0) 推荐(0) 编辑
摘要:前端代码 <Window x:Class="EVES_ManualTest.CurveForm" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.c 阅读全文
posted @ 2023-11-24 09:41 青丝·旅人 阅读(948) 评论(0) 推荐(0) 编辑
摘要:当ComboBox子项过多时,下拉子项会出现滚动条,这样十分不美观 那么怎么解决呢,十分简单,只需要设置ComboBox的【MaxDropDownHeight】为【Auto】即可 示例代码:(其中 MaxDropDownHeight="Auto" 就是解决代码) <ComboBox Style="{ 阅读全文
posted @ 2023-11-16 17:27 青丝·旅人 阅读(134) 评论(0) 推荐(0) 编辑
摘要:效果图: 1、设计DataGrid展示数据模型类 public class DataRecord { public bool IsChecked { get; set; } public DateTime Time { get; set; } public string Title { get; s 阅读全文
posted @ 2023-11-08 17:21 青丝·旅人 阅读(505) 评论(0) 推荐(0) 编辑
摘要:一、调用Winform控件 1、添加 “WindowsFormsIntegration” 程序集引用 2、在前端代码设计处使用命名空间 代码: xmlns:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsForms 阅读全文
posted @ 2023-10-12 17:45 青丝·旅人 阅读(952) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示