Click here to Skip to main content
15,907,392 members
Home / Discussions / WPF
   

WPF

 
QuestionExporting DataGrid To PDF in Silverlight Pin
Suman Gomedhikam10-Aug-10 2:08
Suman Gomedhikam10-Aug-10 2:08 
AnswerRe: Exporting DataGrid To PDF in Silverlight Pin
Abhinav S11-Aug-10 3:58
Abhinav S11-Aug-10 3:58 
QuestionWCF Service Communication Exception after Sometime Pin
vinodkrebc9-Aug-10 23:35
vinodkrebc9-Aug-10 23:35 
AnswerRe: WCF Service Communication Exception after Sometime Pin
Daniel Vaughan14-Aug-10 22:32
Daniel Vaughan14-Aug-10 22:32 
QuestionSQL DataBase display master detail relation Pin
nobodybodybody9-Aug-10 5:25
nobodybodybody9-Aug-10 5:25 
Question"Tagging" a WCF Client Pin
User 127829-Aug-10 2:18
User 127829-Aug-10 2:18 
AnswerRe: "Tagging" a WCF Client Pin
Abhinav S9-Aug-10 5:00
Abhinav S9-Aug-10 5:00 
GeneralRe: "Tagging" a WCF Client Pin
User 127829-Aug-10 9:57
User 127829-Aug-10 9:57 
Maybe a code sample will help:

void MyFunction()
{
  foreach(MyObject mo in MyObjectList)
  {
     XYZClient Client = new XYZClient(mo.Endpoint, ...);
     Client.MyCallCompleted+=newMyCallHandler(CallCompleted);
     Client.MyCallAsync(mo.ID);
  } 
}

void CallCompleted(object Sender, MyCallArgs e)
{
  //Do something with e.Result
}


I need to call a different WCF based on a parameter in MyObject. MyCall is called for each of these services, but they all have the same event handler (CallCompleted). When I get the CallCompleted event, I don't know which MyObject is associated with the return, but I do get the same XYZClient back in the Sender parameter.

I add a Tag property to the XYZClient and tag it with Client.Tag=mo before making the async call, what way I know which mo is associated with the CallCompleted event.

My method works, but has to be re-added everytime I update the service reference. Is there a better way to do this?

modified 12-Jul-20 21:01pm.

AnswerRe: "Tagging" a WCF Client Pin
Abhinav S9-Aug-10 19:03
Abhinav S9-Aug-10 19:03 
GeneralRe: "Tagging" a WCF Client Pin
User 1278211-Aug-10 14:52
User 1278211-Aug-10 14:52 
GeneralRe: "Tagging" a WCF Client Pin
Abhinav S11-Aug-10 17:02
Abhinav S11-Aug-10 17:02 
QuestionWPF: Accessing a style of ResourceDictionary from inside of usercontrol Pin
Prasoon Chaudhary8-Aug-10 21:04
Prasoon Chaudhary8-Aug-10 21:04 
QuestionHow to get the physical path or fullpath of the file in silverlight? Pin
nitincn5-Aug-10 1:04
nitincn5-Aug-10 1:04 
AnswerRe: How to get the physical path or fullpath of the file in silverlight? Pin
#realJSOP5-Aug-10 4:36
professional#realJSOP5-Aug-10 4:36 
GeneralRe: How to get the physical path or fullpath of the file in silverlight? Pin
Luc Pattyn5-Aug-10 7:59
sitebuilderLuc Pattyn5-Aug-10 7:59 
GeneralRe: How to get the physical path or fullpath of the file in silverlight? Pin
Pete O'Hanlon5-Aug-10 11:55
mvePete O'Hanlon5-Aug-10 11:55 
AnswerRe: How to get the physical path or fullpath of the file in silverlight? Pin
Abhinav S5-Aug-10 18:20
Abhinav S5-Aug-10 18:20 
AnswerRe: How to get the physical path or fullpath of the file in silverlight? Pin
Kunal Chowdhury «IN»5-Aug-10 22:40
professionalKunal Chowdhury «IN»5-Aug-10 22:40 
QuestionHow do I know when a databinding has finished????? Pin
friktor4-Aug-10 21:43
friktor4-Aug-10 21:43 
AnswerRe: How do I know when a databinding has finished????? Pin
Pete O'Hanlon4-Aug-10 22:01
mvePete O'Hanlon4-Aug-10 22:01 
GeneralRe: How do I know when a databinding has finished????? Pin
friktor4-Aug-10 22:07
friktor4-Aug-10 22:07 
QuestionHow to add an image to a control via code Pin
Member 44332744-Aug-10 7:49
Member 44332744-Aug-10 7:49 
QuestionHow to add item to ListView with 2 column ? Pin
Yanshof2-Aug-10 19:58
Yanshof2-Aug-10 19:58 
AnswerRe: How to add item to ListView with 2 column ? Pin
Venkatesh Mookkan2-Aug-10 20:56
Venkatesh Mookkan2-Aug-10 20:56 
GeneralRe: How to add item to ListView with 2 column ? Pin
Yanshof2-Aug-10 21:05
Yanshof2-Aug-10 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.