Hi,
I have a user control which has a TreeView control in it as flowing...
<Grid>
<!-- Tree View -->
<TreeView Name="devices"
ItemsSource="{Binding Entities}" AllowDrop="True">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="EventPreviewMouseLeftButtonDown"/>
<EventSetter Event="Drop" Handler="EventDrop"/>
<EventSetter Event="DragOver" Handler="EventDragOver"/>
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="FontWeight" Value="Normal" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
</Style.Triggers>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<Image Width="25" Height="25" Source="{Binding ImagePath}" />
<Button Background="Transparent" BorderBrush="Transparent">
<TextBlock Text="{Binding Name}"/>
</Button>
<StackPanel.ToolTip>
<TextBlock Text="{Binding Description}"/>
</StackPanel.ToolTip>
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Grid>
I am using this usercontrol from my main window as flowing....
<StackPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical" AllowDrop="False">
<local:DevicesTreeview x:Name="srcDevices" Height="220"/>
<local:DevicesTreeview x:Name="destDevices" Height="220"/>
</StackPanel>
I am trying to draging a leaf Node from 'srcDevices' and droping on a leaf Node of 'destDevices' using DragDrop.DoDragDrop. Draging is initiating but no dragdrop event is firing (i.e. DragEnter/DragLeave/DragOver/Drop). How I can fix this problem?
Saquia