简体   繁体   中英

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.

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. This is similar to what the drop-down of the combobox cell does in WPF data grid.

Can anyone tell me how to do that?

Thanks in advance...

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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