Hi,
I'm try this code for drag selecting item if set AllowDrop true not drag and drop file in listbox.
I'm try this code for drag selecting item if set AllowDrop true not drag and drop file in listbox.
<
Window.Resources
>
<
Style
TargetType
=
"telerik:RadListBoxItem"
>
<
Setter
Property
=
"telerik:DragDropManager.AllowCapturedDrag"
Value
=
"True"
/>
</
Style
>
</
Window.Resources
>
<
Window.DataContext
>
<
local:ExampleViewModel
/>
</
Window.DataContext
>
<
Grid
Background
=
"White"
x:Name
=
"LayoutRoot"
>
<
telerik:RadListBox
ItemsSource
=
"{Binding CountryList}"
AllowDrop
=
"True"
x:Name
=
"listBox"
Height
=
"200"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
telerik:RadListBox.ItemTemplate
>
<
DataTemplate
>
<
Grid
Height
=
"50"
Width
=
"100"
Background
=
"LightBlue"
telerik:DragDropManager.AllowDrag
=
"False"
>
<
TextBox
Text
=
"{Binding CountryName}"
VerticalAlignment
=
"Center"
PreviewMouseLeftButtonDown
=
"TextBox_PreviewMouseLeftButtonDown"
MouseLeave
=
"TextBox_MouseLeave"
HorizontalAlignment
=
"Center"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadListBox.ItemTemplate
>
<
telerik:RadListBox.DragDropBehavior
>
<
telerik:ListBoxDragDropBehavior
AllowReorder
=
"True"
/>
</
telerik:RadListBox.DragDropBehavior
>
<
telerik:RadListBox.DragVisualProvider
>
<
telerik:ScreenshotDragVisualProvider
/>
</
telerik:RadListBox.DragVisualProvider
>
<
telerik:RadListBox.DropVisualProvider
>
<
telerik:LinearDropVisualProvider
/>
</
telerik:RadListBox.DropVisualProvider
>
</
telerik:RadListBox
>