简体   繁体   English

如何制作一个大于单元格但完全可见的DataGrid单元格模板

[英]How to make a DataGrid cell template that is larger than the cell but fully visible

In the .Net 4.0 WPF Datagrid, the edit mode of a DataGridComboBoxColumn pops up the ComboBox drop-down in a size that is not dependent on the size of the cell containing the data. 在.Net 4.0 WPF Datagrid中, DataGridComboBoxColumn的编辑模式以不依赖于包含数据的单元格大小的大小弹出ComboBox下拉菜单。

I am building a template for a cell that is somewhat like a combobox, but has features like multi-select, other controls as collaborating neighbors, etc. My editor is working nicely, except for one issue. 我正在为一个有点像组合框的单元格构建模板,但是具有诸如多选功能,协作邻居等其他控件的功能。我的编辑器运行良好,除了一个问题。

I've been trying to figure out how to make the editor appear in front of the DataGridCell that is being edited, and not limited to the current size of that cell, so that the control can be large enough to present content and behaviors nicely to the user. 我一直在尝试找出如何使编辑器出现在正在编辑的DataGridCell前面,并且不限于该单元格的当前大小,以便控件可以足够大以很好地呈现内容和行为。用户。 This is similar to what the drop-down of the combobox cell does in WPF data grid. 这类似于WPF数据网格中组合框单元格的下拉菜单所执行的操作。

Can anyone tell me how to do that? 谁能告诉我该怎么做?

Thanks in advance... 提前致谢...

ComboBoxes使用Popups ,您可以将控件放在一个控件中(大概只有在编辑时->在CellEditingTemplate放置一个控件)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM