12 2022 档案

wpf DataGrid cell 背景色修改参考
摘要:<DataTemplate.Triggers> <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="True"> <Sett 阅读全文

posted @ 2022-12-15 16:16 wu.g.q 阅读(360) 评论(0) 推荐(0) 编辑

wpf 自定义Messagebox时,对话框显示不居中问题
摘要:在自定义Messagebox(有属性Window.SizeToContent="WidthAndHeight")时,对话框显示不居中,经过尝试,应设置如下: msgBox.WindowStartupLocation = WindowStartupLocation.Manual; 在显示的时候用以下函 阅读全文

posted @ 2022-12-15 10:00 wu.g.q 阅读(420) 评论(0) 推荐(0) 编辑

wpf 查找指定类型的子元素
摘要:public List<T> GetChildObjects<T>(DependencyObject obj, Type typename) where T : FrameworkElement { DependencyObject child = null; List<T> childList = 阅读全文

posted @ 2022-12-07 17:23 wu.g.q 阅读(63) 评论(0) 推荐(0) 编辑

wpf DataGrid相关总结
摘要:1.去掉外边蓝框,设置BorderThickness="0" 阅读全文

posted @ 2022-12-05 12:02 wu.g.q 阅读(35) 评论(0) 推荐(0) 编辑

C# DataGrid嵌套DataGrid动态隐藏显示行
摘要:前端代码: <Window x:Class="DataGridPractice.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsof 阅读全文

posted @ 2022-12-05 11:50 wu.g.q 阅读(162) 评论(0) 推荐(0) 编辑

C# RGB转Brush
摘要:C#中自定义一个Brush,使用Color赋RGB值给Brush: dataGrid2.HorizontalGridLinesBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 255, 255)); 阅读全文

posted @ 2022-12-05 11:23 wu.g.q 阅读(195) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

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