Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Is it possible to use the DevExpress Controls (Read 2247 times)
sandeep.gvn
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Feb 2nd, 2011
Is it possible to use the DevExpress Controls
Feb 2nd, 2011 at 10:32am
Print Post  
Dear Friends,

Can any one let me know "Is it possible to use the Third Party Custom Controls like DevExpress/Infragistics/Component Art/XAML"... etc with the Mindfusion Components...

The reason behind asking this question is when ever I try to listbox control of DevExpress along with the Mindfusion Components I am not able to proceed further....

Like there is a Sample with the name "FlowCharter" in Windows Forms of MindFusion... When ever I try to replace the ListBox present on the right hand side of the sample with the DevExpress ImageListBoxControl.. I am not able to do a selection change from the list available.....

The prob occurs when this piece of code fires...


private void imageListBoxControl1_MouseDown(object sender, MouseEventArgs e)
       {
           DoDragDrop(new NodeDragItem(imageListBoxControl1.SelectedIndex),
               DragDropEffects.Copy);
       }


Thanks and Regards,

G.V.N.Sandeep.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Is it possible to use the DevExpress Controls
Reply #1 - Feb 2nd, 2011 at 11:18am
Print Post  
Hi,

Selection might stop working if the DevExpress control selects items in response to MouseUp events, because DoDragDrop will prevent the up event to get to the control. The .NET's standard list control does that upon MouseDown.

Instead of calling DoDragDrop from MouseDown, try doing that from MouseMove if the mouse have moved a few pixels since the button was pressed. You can see this in the DoDragDrop sample code at MSDN. See how MouseDown records the mouse position in the dragBoxFromMouseDown rectangle, MouseMove checks if the pointer is currently in that rectangle, and MouseUp clears it.

If selection in the DevExpress list control is updated only when releasing the mouse button, SelectedIndex might not be a reliable value to detect what shape to drag. Instead you would have to use some method that returns an item or index from the specified point. You will have to check the ImageListBoxControl  reference to see what methods it offers for that.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint