当前位置:网站首页>wpf 获取datagrid 中指定行列的DataGridTemplateColumn中的控件
wpf 获取datagrid 中指定行列的DataGridTemplateColumn中的控件
2022-07-05 20:49:00 【ReflexMechanism】
/// <summary>
/// 获取控件
/// </summary>
/// <param name="control_name">控件名</param>
/// <param name="row">行</param>
/// <param name="col">列</param>
private void setStar(string control_name, int row, int col = 4)
{
DataGridTemplateColumn templeColumn = grd_fan.Columns[col] as DataGridTemplateColumn;
FrameworkElement s = grd_fan.Columns[col].GetCellContent(grd_fan.Items[row]);
Button tbOper = templeColumn.CellTemplate.FindName(control_name, s) as Button;
tbOper.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#ffc400"));
}
边栏推荐
- ts 之 属性的修饰符public、private、protect
- Duchefa丨低熔点琼脂糖 PPC中英文说明书
- 培养机器人教育创造力的前沿科技
- Make Jar, Not War
- Binary search
- Applet event binding
- Abnova CRISPR spcas9 polyclonal antibody protocol
- Popular science | does poor English affect the NPDP exam?
- 10000+ 代码库、3000+ 研发人员大型保险集团的研发效能提升实践
- Pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
猜你喜欢
Abnova丨培养细胞总 RNA 纯化试剂盒中英文说明书
2.<tag-哈希表, 字符串>补充: 剑指 Offer 50. 第一个只出现一次的字符 dbc
Applet global configuration
[record of question brushing] 1 Sum of two numbers
Promouvoir le développement de l'industrie culturelle et touristique par la recherche, l'apprentissage et l'enseignement pratique du tourisme
Interpreting the daily application functions of cooperative robots
从架构上详解技术(SLB,Redis,Mysql,Kafka,Clickhouse)的各类热点问题
Abnova maxpab mouse derived polyclonal antibody solution
Research and development efficiency improvement practice of large insurance groups with 10000 + code base and 3000 + R & D personnel
Which is the best online collaboration product? Microsoft loop, notion, flowus
随机推荐
Duchefa丨低熔点琼脂糖 PPC中英文说明书
Applet global configuration
Duchefa丨S0188盐酸大观霉素五水合物中英文说明书
3.3 project evaluation
shell编程100例
Abnova 环孢素A单克隆抗体,及其研究工具
Duchefa low melting point agarose PPC Chinese and English instructions
Use of form text box (II) input filtering (synthetic event)
ts 之 泛型
教你自己训练的pytorch模型转caffe(一)
Codeforces Round #804 (Div. 2) - A, B, C
【刷题记录】1. 两数之和
Wanglaoji pharmaceutical's public welfare activity of "caring for the most lovely people under the scorching sun" was launched in Nanjing
hdu2377Bus Pass(构建更复杂的图+spfa)
Binary search
bazel是否有学习的必要
ProSci LAG-3 重组蛋白说明书
证券开户选择哪个证券比较好?网上开户安全么?
14、Transformer--VIT TNT BETR
Abnova丨DNA 标记高质量控制测试方案