Popup and TileViewItem reorder

2 posts, 0 answers
  1. Vincent
    Vincent avatar
    2 posts
    Member since:
    Sep 2011

    Posted 01 Sep 2011 Link to this post


    I'm having trouble with the RadTileView when its container is a Popup of a special kind: I'm using Popup whose content is not dynamically created but a DependencyObject of a PopupService.Popup we made.

    <TextBox Text="Hello">
                ItemsSource="{Binding Workers}"
        </local:PopupService.Popup >

    In that case, the TileViewItems can be dragged, but there's no reorder previsualisation, and the items are not reordered when dropped.

    I had some issue already with Drag and Drop using Telerik and they were fixed by setting the LogicalParentProperty:

    private static Popup CreateAndShowPopup(FrameworkElement content, FrameworkElement parent, PlacementMode placement, bool allowTransparency)
        // Create the popup:
        var popup = new Popup { DataContext = parent.DataContext };
        popup.SetValue(Telerik.Windows.RoutedEvent.LogicalParentProperty, new WeakReference(parent)); // required by Telerik to make the drag and drop work
        var popupLayout = new PopupLayout
            AllowTransparency = allowTransparency,
            Content = content
        parent.LayoutUpdated += Parent_LayoutUpdated;
        popup.Child = popupLayout;

    The trouble seems to come from the RadTileView.MoveDraggingItem method where VisualTreeHelper.FindElementsInHostCoordinates is called and returns no element. Of course, this method doesn't use at all the LogicalParentProperty, so there may be something to do there.
  2. Zarko
    Zarko avatar
    755 posts

    Posted 05 Sep 2011 Link to this post

    Hi Vincent,
    Could you please try to send us a project that reproduces this issue because I wasn't able to recreate it with the build in Silverlight popup or with the Telerik popup. I guess the problem comes from the coordinates that we pass to the FindElementsInHostCoordinates method, but I can't confirm that at the moment.
    Also could you please try the 2011.2.823 internal build and see if there's a change in the behavior?

    Best wishes,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top