Can not drop indicator

2 posts, 1 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 30 Jan 2014 Link to this post

    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



  2. Answer
    Yana
    Admin
    Yana avatar
    4554 posts

    Posted 03 Feb 2014 Link to this post

    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 >>
  3. DevCraft banner
Back to Top