Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
New to WCF, I am hosting a WCF class in a windows service. This service is a client that continually reads data from an OPC server, and I have a set of DataContracts [5 objects] for objects of interest. When one object changes - I read the other 4 objects or write to them.
My Win Forms application needs to bind to these Datacontracts and auto magically update the display.

I want to write the code for my Winforms client to BIND to the DataContract objects.

I read on MSDN and saw an example - but then they had an object that was generated by a tool (svcutil) - which I could not see.

My Questions are :
1: Am I correct in assuming that I need a WCF service for each DataContract ?

2: How do I write the code in my client so that I may databind directly to the DataContract ?

I am new to WCF and have been reading a lot on it - but still have plenty to learn - so please keep it simple , ( easily understandable ) pseudo code or a small sample code would be nice, any gotchas or important points would be nice.

Thanks..
Posted
Comments
Florian Braun 30-Apr-15 9:22am    
Just an short idea as im not experienced in binding nor wcf. I played with wcf and used some callbacks to get data and events from Server to Clients
stixoffire 30-Apr-15 9:40am    
I know that if I get a callback I can write code to update the client, but what I am looking for is more automagic. For example I have code that communicates with a server that pumps out data, that data might have a change event or something and I manage the info from that into some classes (objects) that on some I keep a list<t> of, others are just that an object class, I want to bind my client to the WCF service object or list<t> objects and have the gui in the client automatically update from the WCF service as my bindingsource.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900