Drag and Drop within ListBox - no indicator when dropping into last position?

6 posts, 0 answers
  1. Steve
    Steve avatar
    8 posts
    Member since:
    Jun 2013

    Posted 27 Aug 2013 Link to this post

    I am trying to get drag and drop within a list box working.  With the following XAML, I don't see the drop indicator when attempting to drop the item below the last item, yet the drop still works...

    <UserControl.Resources>
             
            <ListBoxDragReorderWpf:TemplateViewModel x:Key="TemplateViewModel"/>
             
            <DataTemplate x:Key="RadListBoxItemTemplate">
                <TextBlock Text="{Binding Name}"/>
            </DataTemplate>
             
            <Style x:Key="RadListBoxContainerStyle" TargetType="{x:Type telerik:RadListBoxItem}">
                <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"/>
            </Style>
             
            <Style x:Key="RadListBoxStyle"
                   TargetType="{x:Type telerik:RadListBox}">
                <Setter Property="ItemContainerStyle" Value="{StaticResource RadListBoxContainerStyle}"/>
                <Setter Property="ItemTemplate" Value="{StaticResource RadListBoxItemTemplate}"/>
            </Style>
             
        </UserControl.Resources>
         
        <Grid DataContext="{StaticResource TemplateViewModel}">
             
            <telerik:RadListBox ItemsSource="{Binding Pages}"
                                Style="{StaticResource RadListBoxStyle}"
                                Width="100"
                                Height="200">
                <telerik:RadListBox.DragDropBehavior>
                    <telerik:ListBoxDragDropBehavior/>
                </telerik:RadListBox.DragDropBehavior>
                <telerik:RadListBox.DragVisualProvider>
                    <telerik:ScreenshotDragVisualProvider />
                </telerik:RadListBox.DragVisualProvider>
                <telerik:RadListBox.DropVisualProvider>
                    <telerik:LinearDropVisualProvider />
                </telerik:RadListBox.DropVisualProvider>
            </telerik:RadListBox>     
             
        </Grid>
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 28 Aug 2013 Link to this post

    Hello Steve,

    We are aware of this behavior and it has already been logged in our public issue tracking system, you can track its status on the following link:
    http://www.telerik.com/support/pits.aspx#/details/Issue=15320

    Part of logged issue is the invisible horizontal line after the last item when dragging. When the ListBox is inside of a Grid it is completely invisible, but when it is inside of StackPanel the line is visible but may appear a little bit lower than should be. So as a work-around I would suggest that you put the ListBox inside StackPanel (I've tested that with the provided code and worked as expected).

    Hope this will help you.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ian
    Ian avatar
    3 posts
    Member since:
    Dec 2013

    Posted 05 May 2014 in reply to Kalin Link to this post

    Hi Kalin,

    It seems that this issue still appears in 2014.1.331.45. Any update on this issue? I couldn't get any information from the public issue tracking system link above - it just goes to the main Support page.

    Cheers,
    Ian
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 07 May 2014 Link to this post

    Hi Ian,

    This issue has been recently fixed. The fix is available with the latest internal build, so you can download it and test it.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Ian
    Ian avatar
    3 posts
    Member since:
    Dec 2013

    Posted 07 May 2014 in reply to Kalin Link to this post

    Thanks Kalin,

    I will do. Any word on when the next official release will be available?

    Cheers,
    Ian
  7. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 08 May 2014 Link to this post

    Hello Ian,

    The next official release should be available at the end of June.

    If you have any other questions let us know.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready