This is a migrated thread and some comments may be shown as answers.

Popup and TileViewItem reorder

1 Answer 22 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 01 Sep 2011, 05:36 PM
Hello,

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.

Eg.
 
<TextBox Text="Hello">
    <local:PopupService.Popup>
        <Controls:RadTileView
            ItemsSource="{Binding Workers}"
            DisplayMemberPath="Name"
            ColumnsCount="1"
            MaximizeMode="Zero"/>
    </local:PopupService.Popup >
 </TextBox>


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.

1 Answer, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 05 Sep 2011, 01:33 PM
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,
Zarko
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 >>

Tags
TileView
Asked by
Vincent
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Share this question
or