Hi!
When I drag an appointment in the ScheduleView and drag it over a slot where it can not be dropped, I get an indicator (red ring with a diagonal line).
But when I drag something from a ListBox into the ScheduleView I create my own DragCue and I don't get that indicator.
Can I create my cue in another way or can I somehow display the can not drop indicator?
Here is my cue I create in OnDragQuery():
Regards,
Håkan
When I drag an appointment in the ScheduleView and drag it over a slot where it can not be dropped, I get an indicator (red ring with a diagonal line).
But when I drag something from a ListBox into the ScheduleView I create my own DragCue and I don't get that indicator.
Can I create my cue in another way or can I somehow display the can not drop indicator?
Here is my cue I create in OnDragQuery():
ContentControl cue =
new
ContentControl();
cue.ContentTemplate =
this
.Resources[
"ItemDragTemplate"
]
as
DataTemplate;
cue.Content = listBox.SelectedItem;
e.Options.DragCue = cue;
<
DataTemplate
x:Key
=
"ItemDragTemplate"
>
<
Grid
HorizontalAlignment
=
"Left"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"18"
/>
<
ColumnDefinition
Width
=
"63"
/>
</
Grid.ColumnDefinitions
>
<
Rectangle
Grid.Column
=
"0"
Grid.ColumnSpan
=
"2"
Stroke
=
"{StaticResource ContentBorderBrush}"
Fill
=
"{Binding ShiftTypeColor}"
RadiusX
=
"2"
RadiusY
=
"2"
Margin
=
"-1,-1,-1,-1"
/>
<
Image
Grid.Column
=
"0"
Source
=
"/Soe.Silverlight;component/img/16/user.png"
Width
=
"16"
Height
=
"16"
HorizontalAlignment
=
"Center"
/>
<
TextBlock
Grid.Column
=
"1"
Text
=
"{Binding Name}"
VerticalAlignment
=
"Center"
Margin
=
"0,0,5,0"
/>
</
Grid
>
</
DataTemplate
>
Regards,
Håkan