当前位置:网站首页>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"));
}
边栏推荐
- 解读协作型机器人的日常应用功能
- Duchefa cytokinin dihydrozeatin (DHZ) instructions
- Point cloud file Dat file read save
- 珍爱网微服务底层框架演进从开源组件封装到自研
- Analyze the knowledge transfer and sharing spirit of maker Education
- shell编程100例
- AI 从代码中自动生成注释文档
- PHP反序列化+MD5碰撞
- Pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
- ProSci LAG3抗体的化学性质和应用说明
猜你喜欢
Applet global configuration
ProSci LAG3抗体的化学性质和应用说明
表单文本框的使用(二) 输入过滤(合成事件)
【刷题记录】1. 两数之和
基于AVFoundation实现视频录制的两种方式
Abnova fluorescent dye 620-m streptavidin scheme
PHP反序列化+MD5碰撞
Specification of protein quantitative kit for abbkine BCA method
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
2. < tag hash table, string> supplement: Sword finger offer 50 The first character DBC that appears only once
随机推荐
概率论机器学习的先验知识(上)
The development of research tourism practical education helps the development of cultural tourism industry
【UE4】UnrealInsight获取真机性能测试报告
Hongmeng OS' fourth learning
Is it safe to open a stock account by mobile phone? My home is relatively remote. Is there a better way to open an account?
解析创客教育的知识迁移和分享精神
go 文件路径操作
Is the securities account given by the school of Finance and business safe? Can I open an account?
Redis唯一ID生成器的实现
Abnova maxpab mouse derived polyclonal antibody solution
Norgen AAV extractant box instructions (including features)
Duchefa low melting point agarose PPC Chinese and English instructions
2.<tag-哈希表, 字符串>补充: 剑指 Offer 50. 第一个只出现一次的字符 dbc
Abnova DNA marker high quality control test program
Applet event binding
教你自己训练的pytorch模型转caffe(三)
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
Abnova cyclosporin a monoclonal antibody and its research tools
ProSci LAG-3 重组蛋白说明书
Simple understanding of interpolation search