Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop to TextBox no longer working #85

Closed
cts-craig opened this issue Feb 12, 2014 · 1 comment
Closed

Drop to TextBox no longer working #85

cts-craig opened this issue Feb 12, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@cts-craig
Copy link

I have upgraded from v0.1.3.0 to v0.1.3.11 and I can not drag from a listbox to a textbox. Without changing any code or XAML, if I switch back to the older version, this works again.

Here is my XAML:

        <ListBox ItemsSource="{Binding Names}" Grid.Column="0"
                 dragDrop:DragDrop.IsDragSource="True"></ListBox>
        <TextBox Text="{Binding Name,Mode=OneWay}" IsReadOnly ="True"  Grid.Column="1" Height="30" 
                 dragDrop:DragDrop.IsDropTarget="True"
                 dragDrop:DragDrop.DropHandler="{Binding MyDropHandler}" />

Here is my DropHandler:

    public class MyDropHandler : IDropTarget
    {
        private readonly MainWindowViewModel _mainWindowViewModel;

        public MyDropHandler(MainWindowViewModel mainWindowViewModel)
        {
            _mainWindowViewModel = mainWindowViewModel;
        }

        public void DragOver(IDropInfo dropInfo)
        {
            dropInfo.Effects = DragDropEffects.Copy;
        }

        public void Drop(IDropInfo dropInfo)
        {
            _mainWindowViewModel.Name = (string) dropInfo.Data;
        }
    }

I am going to start looking through the code changes for the DD library to see if can see what change might have affected this.

punker76 added a commit that referenced this issue Feb 12, 2014
@punker76 punker76 mentioned this issue Feb 12, 2014
punker76 added a commit that referenced this issue Feb 12, 2014
@cts-craig
Copy link
Author

Thanks for the fast response, works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants