Autor Beitrag
Christoph1972
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 690
Erhaltene Danke: 16


VS2015 Pro / C# & VB.Net
BeitragVerfasst: Di 27.09.11 17:23 
Hallo Leute,

mir ist heute aufgefallen, wenn von Windows(XP) die Suche läuft, das man weder in einer ListBox oder in einem DataGrid Items selektieren kann, wenn diese Controls ein Drag & Drop erlauben.

Ich habe fast eine Krise bekommen, auf mal ließ sich mein Programm nicht mehr bedienen, obwohl ich keine Änderungen vorgenommen habe. In der Taskleiste lief vom Explorer die Suche, ich hatte in unserem Netzwerk nach Files gesucht, was eine menge Zeit in Anspruch nahm. So konnte diese, wohl ehr seltene, Konstellation zu Stande kommen.


ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
void SampleListBox_PreviewMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
    ListBox parent = ListBox sender As ListBox;
    dragSourceListBox = parent;
    object data = GetDataFromListBox(dragSourceListBox, e.GetPosition(parent));

    if (data != null)
    {  
        DragDrop.DoDragDrop(parent, data, DragDropEffects.Move);//<--Diese Zeile verursacht das Problem.
    }
}


Wie kann das sein ? :lol:

_________________
Gruß
Christoph