Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Reply To: DragDropManager in WPF with ContentControl

$
0
0

Reema,

In the main User Control, I include two contentcontrols (cclInvoice and cclExpense). To each, I assign a usercontrol (essentially) a standard ListBox . XAML in the main UserControl:

x:Name="cclInvoice" Content="{Binding}"
ContentTemplate="{StaticResource InvoiceTemplate}"
Margin="0,0,0,-30" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">

x:Name="cclExpense" Content="{Binding}" ContentTemplate="{StaticResource ExpenseTemplate}" Margin="0,0,0,-30">

Defined in my main ResourceDictionary: The InvoiceTemplate & ExpenseTemplate:




And finally the Usercontrols (essentially identical at this time, so here is the ExpenseView):

Style="{StaticResource DragDropListBox}"
ItemsSource="{Binding}"
ItemTemplate="{StaticResource StudentTemplate}" PreviewMouseDown="TextBlock_PreviewMouseDown">





The issue, is that once I moved each ListBox into a separate file to include as a UserControl, the dragdrop operation never gets initiated.

I have provided a screenshot showing the ATPInvoiceSelection View; the code behind that populates the ListBoxes (a bit of a mess because I have tried everything); the AtpInvoiceSelectionView (main view) and the ExpenseView.

Hopefully that’s enough information for you to help.

Thanks,

[GC] – source files resubmitted as a zip archive.


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>