DragDrop Problem in dragging object with collapsed Grid,Canvas,DockPanel..

5 posts, 0 answers
  1. Claudio
    Claudio avatar
    9 posts
    Member since:
    Feb 2009

    Posted 17 Dec 2010 Link to this post

    Hi, 
    i have a Problem in dragging object with collapsed Grid,Canvas,DockPanel    using RadDragDropManager.
    I have an user Control like this :
    <UserControl>
      <StackPanel>
       <Grid_1>
         <label>
         <myUserControl_1>
       </Grid>
       <Grid_2>
        <label>
        <myUserControl_2>
      </Grid>
       <Grid_3>
        <label>
        <myUserControl_3>
      </Grid>
    </Grid>
    </StackPanel>

    In run time mode i collapse one of these Grid. (for example Grid_2)
    When i try to drag onto myUserControl_1 i received OnDrop Event on myUserControl_2.
    What's Wrong?
    Anyone still get the same problem ?
    Thanks.

    Bye
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 21 Dec 2010 Link to this post

    Hi Claudio,

    Could you please specify the version of the binaries you are using as well as if you are refering to RadDragDropManager.OnDropQuery/OnDropInfo or FrameworkElement.Drop event.

    Kind regards,
    Tsvyatko
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Claudio
    Claudio avatar
    9 posts
    Member since:
    Feb 2009

    Posted 21 Dec 2010 Link to this post

    Hi,
    thanks for the answer.
    I use RadDragDropManager.OnDropQuery/OnDropInfo.

    Telerik.Windows.Controls

     

    Runtime Version             v4.0.30319

    Version                               2010.2.714.40

     

     

    Telerik.Windows.Controls.Input

    Runtime Version             v4.0.30319

    Version                               2010.2.714.40

     

    private void OnDropQuery(object sender, DragDropQueryEventArgs e)
            {
                switch (e.Options.Status)
                {
                    case DragStatus.DropDestinationQuery:
                        e.QueryResult = e.Options.Payload is VariabilePlc;
                        e.Handled = true;
                        break;
      
                }
            }
      
            private void OnDropInfo(object sender, DragDropEventArgs e)
            {
                if (e.Options.Status != DragStatus.DropComplete) return;
      
                VariabilePlc vPlc = e.Options.Payload as VariabilePlc;
      
                List<TipoVariabilePlc> ListaAmmessi = new List<TipoVariabilePlc>(new TipoVariabilePlc[] 
                
                    TipoVariabilePlc.Plc_DINT,
                    TipoVariabilePlc.Plc_UINT,
                    TipoVariabilePlc.Plc_INT
                });

  5. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 24 Dec 2010 Link to this post

    Hi Claudio,

    I have tested your scenario and received the same result as the one described. The issue you are facing has been resolved in more recent versions. You can check our more recent release (I have attached sample with most recent internal build) where this issue has been resolved.

    However, if you prefer not to upgrade I can suggest to set IsHitTestVisible to false on the collapsed elements.

    All the best,
    Tsvyatko
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Claudio
    Claudio avatar
    9 posts
    Member since:
    Feb 2009

    Posted 24 Dec 2010 Link to this post

    THANK YOU SO MUCH !!!.
    GREAT JOB!
Back to Top
UI for WPF is Visual Studio 2017 Ready