WPF 批量修改控件属性
摘要:<Style TargetType="TextBox"> <Setter Property="Height" Value="24" /> </Style>
阅读全文
对实体属性值赋值(DATASET转list)
摘要:var list = new List<param>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { var ps = typeof(param).GetProperties().ToList();
阅读全文
WPF 进度条实现
摘要:1、样式 <Style TargetType="{x:Type ProgressBar}"> <Setter Property="Maximum" Value="100" /> <Setter Property="Height" Value="70" /> <Setter Property="Val
阅读全文
WPF 异步刷新主界面
摘要:1、启动子线程 Task.Factory.StartNew(() => PrintExecute(false)); 2、涉及到列表刷新时需要转回主线程刷新,属性一般会自动刷新 Application.Current.Dispatcher.Invoke(new Action(() => { Curre
阅读全文