I have a WPF drop down control (illustrated using theComboBox control below) that is host in the Xceed Win Forms GridControl using aCellEditorManager.
PROBLEM: If I open the drop down and click anywhere in thedrop down that is also overlapping a cell then the drop down disappears and theclick falls through the underlying control. If the drop down is clicked overanother area (outside of the GridControl or outside of a cell area) then theclick is handled by the WPF combo box without problems.
How can I make the GridControl behave itself and notintercept mouse events?
EXAMPLE:
To setup the cell:
var control = newMyWpfCombo();
_column.CellEditorManager =
new CellEditorManager(control,”Text”, true, true);
And the MyWpfCombo class:
public classMyWpfCombo : ElementHost
{
private readonlySystem.Windows.Controls.ComboBox _combo =
newSystem.Windows.Controls.ComboBox();
public MyWpfCombo()
{
Child = _combo;
_combo.BorderThickness = newThickness(0);
_combo.Padding = newThickness(-1,1,1,1);
_combo.ItemSource = new[]{“Foo”, “Bar”, “Baz”};
_combo.IsEditable = true;
}
protected override string Text
{
get { return (string)_combo.SelectedItem; }
set { _combo.SelectedItem =value; }
}
protected override Size DefaultSize
{
get { return new Size(121, 21);}
}
}
Imported from legacy forums. Posted by Peter (had 1387 views)