Bug Report T297995
Visible to All Users

TileLayoutControl - Broken synchronization with ItemsSource after drag&drop of external items using the MVVM approach

created 9 years ago

Hello,

Based on the solution of the following ticket:

https://www.devexpress.com/Support/Center/Question/Details/T190614

I tried to create an MVVM approach of the recommended solution. The problem I am having is that when you remove all the items from the ObservableCollection that the TileLayoutControl.ItemsSource bound with and then you start adding new items (with drag and drop) you have a mismatch with the order of the items in the TileLayoutControl and the ObservableCollection.

The scenario to reproduce the problem, in the sample project, is the following:

  1. At the initial state of the program you can add new items from the ListBox at the left edge of the window with drag and drop or you can rearrange the existing items in the TileLayoutControl. When you click at the "Print Collection" button a message box with the order of the collection will appear. As you will see the order of the collection and the order of the Tiles in the TileLayoutControl is the same.
  2. Remove all the items from the TileLayoutControl by clicking the "Remove All Tiles"
  3. Start adding new items with drag and drop
  4. If you click now the "Print Collection" button you will notice a mismatch in the order of the items in the ObservableCollection of the ViewModel and in the items of the TileLayoutVControl.

Is there a way or can you suggest a solution to avoid this problem.

Thanks in advance

Answers approved by DevExpress Support

created 9 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.