hi~
The issue can be showed in the code below
I have two TextBlocks, the only difference between them is where they are.
but the one inside the RadPane never fires a Drop Event.
xaml:
code behind:
The issue can be showed in the code below
I have two TextBlocks, the only difference between them is where they are.
but the one inside the RadPane never fires a Drop Event.
xaml:
<Window x:Class="test.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <TextBlock Name="src" Text="src" Grid.Column="0" PreviewMouseDown="src_PreviewMouseDown"></TextBlock> <telerik:RadDocking Grid.Column="1"> <telerik:RadSplitContainer HorizontalAlignment="Stretch"> <telerik:RadPaneGroup> <telerik:RadPane> <Grid> <TextBlock AllowDrop="True" Background="LightYellow" Text="dst1" Drop="TextBlock_Drop"/> </Grid> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking> <TextBlock AllowDrop="True" Background="LightBlue" Text="dst2" Drop="TextBlock_Drop" Grid.Column="2"/> </Grid></Window>code behind:
//using blahblah...namespace test{ public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void TextBlock_Drop(object sender, DragEventArgs e) { (sender as TextBlock).Text = "On drop"; } private void src_PreviewMouseDown(object sender, MouseButtonEventArgs e){ string k = (sender as TextBlock).Text; DragDropEffects allowedEffects = DragDropEffects.Move | DragDropEffects.Copy | DragDropEffects.Link; DragDrop.DoDragDrop(sender as TextBlock, k, allowedEffects); } }}