Click here to Skip to main content
15,921,793 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: custom, main window look with wpf Pin
Jammer7-Aug-08 4:35
Jammer7-Aug-08 4:35 
QuestionASP.NET control in Silverlight Pin
rg106-Aug-08 23:18
rg106-Aug-08 23:18 
AnswerRe: ASP.NET control in Silverlight Pin
Michael Sync10-Aug-08 22:50
Michael Sync10-Aug-08 22:50 
QuestionNew to silverlight (Silverlight as a desktop UI for Windows Mobile) Pin
Ahmed Charfeddine6-Aug-08 5:58
Ahmed Charfeddine6-Aug-08 5:58 
AnswerRe: New to silverlight (Silverlight as a desktop UI for Windows Mobile) Pin
Michael Sync10-Aug-08 22:49
Michael Sync10-Aug-08 22:49 
GeneralRe: New to silverlight (Silverlight as a desktop UI for Windows Mobile) Pin
Ahmed Charfeddine10-Aug-08 23:46
Ahmed Charfeddine10-Aug-08 23:46 
Questiondrag and drop question Pin
Member 2898335-Aug-08 7:12
Member 2898335-Aug-08 7:12 
AnswerRe: drag and drop question Pin
MIHAI_MTZ5-Aug-08 21:42
MIHAI_MTZ5-Aug-08 21:42 
The simplest solution is to start the dragdrop with this line
"DragDrop.DoDragDrop(tvi, dragContext.Description, DragDropEffects.Copy);"
I assume that Description is a string. You can than just forget about the other two events. The textbox already knows how to handle the dragover and dragdrop events with strings.

This is what is causing the behaviour. The textbox already has a command binding for the paste command which handles the two events and marks them as handled.

If you want to drag drop other things than string, you'll have to handle the events before textbox does, and to mark them as hadled so it can't override your settings:

TextBox AllowDrop="True" Drop="TextBlock_Drop" PreviewDragOver="TextBlox_DragOver" PreviewDragEnter="TextBlox_DragOver"



private void TextBlox_DragOver(object sender, DragEventArgs e)
{
    if (e.Data.GetDataPresent(typeof(Button))) 
    { 
        e.Effects = DragDropEffects.Copy; 
    } 
    else 
    { 
        e.Effects = DragDropEffects.None; 
    }
    e.Handled = true;
}

GeneralRe: drag and drop question Pin
Member 2898336-Aug-08 6:02
Member 2898336-Aug-08 6:02 
QuestionRetrieve content of a Cell in WPF Grid Pin
ezazazel4-Aug-08 23:55
ezazazel4-Aug-08 23:55 
AnswerRe: Retrieve content of a Cell in WPF Grid Pin
MIHAI_MTZ5-Aug-08 2:09
MIHAI_MTZ5-Aug-08 2:09 
GeneralRe: Retrieve content of a Cell in WPF Grid Pin
ezazazel5-Aug-08 10:19
ezazazel5-Aug-08 10:19 
GeneralRe: Retrieve content of a Cell in WPF Grid Pin
MIHAI_MTZ5-Aug-08 21:46
MIHAI_MTZ5-Aug-08 21:46 
QuestionWPF Icon [modified] Pin
DocMod4-Aug-08 18:40
DocMod4-Aug-08 18:40 
AnswerRe: WPF Icon Pin
DocMod6-Aug-08 6:45
DocMod6-Aug-08 6:45 
QuestionDataTemplate "library" Pin
Spaz803-Aug-08 21:32
Spaz803-Aug-08 21:32 
AnswerRe: DataTemplate "library" Pin
Gideon Engelberth4-Aug-08 3:13
Gideon Engelberth4-Aug-08 3:13 
AnswerRe: DataTemplate "library" Pin
Jammer5-Aug-08 2:42
Jammer5-Aug-08 2:42 
QuestionMake A Storyboard Reverse Pin
BlitzPackage3-Aug-08 10:11
BlitzPackage3-Aug-08 10:11 
AnswerRe: Make A Storyboard Reverse Pin
Pete O'Hanlon3-Aug-08 11:08
mvePete O'Hanlon3-Aug-08 11:08 
Questionsilverlight-InitializeComponent Pin
r aa j1-Aug-08 1:50
r aa j1-Aug-08 1:50 
AnswerRe: silverlight-InitializeComponent Pin
Michael Sync3-Aug-08 21:13
Michael Sync3-Aug-08 21:13 
Questiongetting HttpWebRequest Pin
r aa j30-Jul-08 21:30
r aa j30-Jul-08 21:30 
AnswerRe: getting HttpWebRequest Pin
Michael Sync31-Jul-08 16:45
Michael Sync31-Jul-08 16:45 
GeneralRe: getting HttpWebRequest Pin
r aa j31-Jul-08 21:05
r aa j31-Jul-08 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.