-
[DX_WPF] CellTemplateSelectorDevExpress/DX_WPF 2025. 2. 19. 13:25
View.xaml
Resource Dictionary 등록
Resource Dictionary의 x:Key 값이 "ValueEditorTemplateSelector" 인거 사용
ValueEditorTemplateSelector.xaml
ValueEditorTemplateSelector.cs
RowData.Row 를 해당하는 데이터 타입으로 변환(ex ITagData) 해서
RowData.Row.(필드이름=ITagData의 프로퍼티) 를
TryFindResource로 ( View.xaml + Resource Dictionary) 에서 찾아서(x:key = dataItem.Type) 있으면
(DataTemplate)으로 반환, 없으면 null 반환.
https://docs.devexpress.com/WPF/DevExpress.Xpf.Grid.ColumnBase.CellTemplateSelector
ColumnBase.CellTemplateSelector Property | WPF Controls | DevExpress Documentation
ColumnBase.CellTemplateSelector Property Gets or sets an object that chooses a cell template based on custom logic. This is a dependency property. Namespace: DevExpress.Xpf.Grid Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll NuGet Package: DevExpress.Wpf.Gri
docs.devexpress.com
728x90'DevExpress > DX_WPF' 카테고리의 다른 글
[DX_WPF] Mask (0) 2025.02.20 [DX_WPF] EventToCommand (0) 2025.02.07 [DX_WPF] NotifyIconService (0) 2024.12.12 [DX_WPF] Module Manager (0) 2024.11.28 [DX_WPF] DXDynamicModule (0) 2024.10.14 댓글