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

WPF

 
GeneralRe: custom, main window look with wpf Pin
valajbeg7-Aug-08 3:29
valajbeg7-Aug-08 3:29 
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 
Friends, Please help!

I am writing a WPF application using .net 3.5 and VS 2008. Trying to achieve drag and drop operation.

1. I initiate the dragdrop operation by DragDrop.DoDragDrop in the TreeviewItem's mouseMove event. The second parameter in the DoDragDrop method has a object.
2. I am trying to drop this data onto a textbox. I have coded Drop and DragOver events of the textbox. And I have set the AllowDrop property of the textbox to true.
3. I get the symbol operation not allowed when I am on the textbox. I also notice that neither my dragover and drop events are getting fired.
4. I change the textbox to textblock everything works fine.
5. I also tested this with a ListBox and it works fine too.
6. I need to make this work for textbox, can somebody please help? What am I doing wrong?

I am including my code in the following code block...


void REQNode_MouseMove(object sender, MouseEventArgs e)
     {
         if (e.LeftButton == MouseButtonState.Pressed)
         {
             TreeViewItem tvi = sender as TreeViewItem;
             dragContext = tvi.Tag as REQRequirement;
             DragDrop.DoDragDrop(tvi,dragContext, DragDropEffects.Copy);
         }
     }
     private void txtPostCond_DragOver(object sender, DragEventArgs e)
     {
         if (e.Data.GetDataPresent(typeof(REQRequirement)))
         {
             e.Effects = DragDropEffects.Copy;
         }
         else
         {
             e.Effects = DragDropEffects.None;
         }
     }

     public void txtPostCond_Drop(object sender, DragEventArgs e)
     {
         if (e.Data.GetDataPresent(typeof(REQRequirement)))
         {
             REQRequirement req = (REQRequirement)e.Data.GetData(typeof(REQRequirement));
             txtPostCond.Text = req.Description;
         }
     }


Please Help!
Thank you,
Srini.
AnswerRe: drag and drop question Pin
MIHAI_MTZ5-Aug-08 21:42
MIHAI_MTZ5-Aug-08 21:42 
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 

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.