When creating the drag visual in codebeind, I am not seeing the data being bound to theTileViewItem, although the styles and templates are being applied, how can I get the data to bind?
01.private void OnDragInitialize(object sender, DragInitializeEventArgs args)02. {03. var data = ((RadRadioButton)args.OriginalSource).DataContext as ITile;04. 05. var payload = DragDropPayloadManager.GeneratePayload(null);06. payload.SetData("DragData", data);07. 08. args.Data = payload;09. args.AllowedEffects = DragDropEffects.All;10. args.DragVisual = new RadTileViewItem11. {12. DataContext = data,13. ContentTemplate = Application.Current.FindResource("DashboardTileView_ContentTemplate") as DataTemplate,14. HeaderTemplate = Application.Current.FindResource("DashboardTileView_ItemTemplate") as DataTemplate,15. Style = Application.Current.FindResource("DashboardTileView_ItemStyle") as Style16. };17. }
Thank you,
Maurice