You could listen to the CopyingCellClipboardContent event:
<DataGridComboBoxColumn x:Name="comboColumn" CopyingCellClipboardContent="OnCopying" ... />
The handler would be something like this:
void OnCopying(object sender, DataGridCellClipboardEventArgs args)
{
if (args.Column == comboColumn && args.Item as ComboBox<float> != null)
args.Content = ((ComboBox<float>)args.Item).Key;
}
Alternatively, if you want to subclass the DataGridComboBoxColumn
class, you could override its OnCopyingCellClipboardContent method:
public class CustomDataGridComboBoxColumn : DataGridComboBoxColumn
{
public override object OnCopyingCellClipboardContent(object item)
{
if (item as ComboboxPair<float> is null)
return null;
return ((ComboboxPair<float>)item).Key;
}
}