
I just happened to notice that Actipro edit controls enable drag and drop by default.
This happens to be the default behaviour for a standard TextBox control, you can easily disable this behaviour by setting AllowDrop to False.
However for Actipro contols this on its own does not work. The only way I can get it to work is by setting the AllowDrop to false (not strictly necessary but without it if your control is larger than the internal edit box depending on where you mouse is, it can look like the control accepts drop) and then handling the Loaded event for each control, by either adding Loaded += EventHandler or by deriving a new class that inherits from the actipro control and wires up the Loaded event for me. Then in the loaded event I need to doprivate void OnLoaded(object sender, RoutedEventArgs e)
{
if (Template.FindName("PART_TextBox", this) is EmbeddedTextBox textBox)
textBox.AllowDrop = false;
}
This seems like a lot of hassle to set a standard property (but I have run into this a few times with the Actipro controls).
Does anybody know of a better way?