WPF表格控件的列利用模块适配动态枚举类

将枚举列表转化到类内部赋值,在初始化表格行加载和双击事件时,触发类里面的枚举列表的赋值

<c1:Column Header="变更类型" Binding="{Binding ChangeType, Mode=TwoWay, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" ColumnName="ChangeType" Width="150" TextWrapping="True">

<c1:Column.CellTemplate>

<DataTemplate>

<c1:C1ComboBox BorderThickness="0" Style="{StaticResource StackPanel-C1ComboBox-Multiple}" Width="150" IsDropDownOpen="True"

Margin="0" SelectedValue="{Binding ChangeType,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True }"

DisplayMemberPath="Value" SelectedValuePath="Key"

ItemsSource="{Binding StackClassChangeTypeList}"/>

</DataTemplate>

</c1:Column.CellTemplate>

</c1:Column>

效果

相关推荐
gc_22994 小时前
学习C#调用OpenXml操作word文档的基本用法(14:学习文档编号定义类)
word·openxml·编号定义
diegoXie11 小时前
【R】tidyr::pivot_longer / pivot_wider 学习笔记
笔记·学习·r语言
wtsolutions1 天前
比Word邮件合并功能更强大的Sheet-to-Doc优势功能
word·批量生成·邮件合并·wtsolutions·sheet-to-doc
diegoXie1 天前
Seurat V5 结构树和基础整合pipeline
r语言·单细胞·seuratv5
子根1 天前
【word】的一些通配符使用方法
word
manjianghong861 天前
如何将一本书PDF扫描件转word 并打印(免费工具)
pdf·word·pdf处理工具
huluang1 天前
Word文档批注智能克隆系统的设计与实现
开发语言·c#·word
bugcome_com2 天前
WPF 核心布局控件全解析:从 Grid 到 UniformGrid 的实战应用
c#·wpf
gc_22992 天前
学习C#调用OpenXml操作word文档的基本用法(13:学习文档设置类)
word·openxml·文档设置