This is a migrated thread and some comments may be shown as answers.

Can not drop indicator

1 Answer 40 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Håkan
Top achievements
Rank 1
Håkan asked on 30 Jan 2014, 10:18 AM
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():

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



1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 03 Feb 2014, 12:25 PM
Hello Håkan,

Please check the other forum thread regarding drag and drop between RadScheduleView and RadListBox:
http://www.telerik.com/forums/detect-drag-drop-cancel

With the suggested solution, you will receive the cannot drop indicator when returning false inside CanDrop method of the ScheduleVeiwDragDropBehavior.

I hope this helps.

Regards,
Yana
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ScheduleView
Asked by
Håkan
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or