While writing a custom paint routine you may come across a strange phenomenon where some of the controls on the Winforms are not painting correctly or even appearing at times. This is usually due to Control.Invalidate() being called recursively, and the API tries to keep on painting what is important and defers the painting of […]
There are 2 general types of objects that will use an interface. (1) an object that provides services (2) a newbie object that wants to get along well and integrate with existing objects.
Just a stub Creating Service Contract Creating DataContract Creating FaultContract Creating Windows Service Host Creating Proxy Creating Client Creating app.config with WCF config Editor in Microsoft Visual Studio 2010 Installing/Uninstalling/Starting/Stopping Windows Service Host with sc.exe Use client to connect proxy to host, and consuming services. Programatically configure service and proxy using and without using app.config […]
Just a stub: Service Host Endpoint Binding Metadata Behavior Protocol Tracing Message Fault Proxy Client
Just a stub first: WCF is Windows Communications Foundation By default, it sends message using SOAP protocol by serializing data structures into XML. For serialization, it specifies the DataContract and DataMember attributes. For Interface programming, it specifies the ServiceContract and OperationContract attributes. For Error and Exception handling, it specifies the FaultContract attribute. Language agnostic (the […]
A lot of times I had to look for a data structure to store one to many relationships such as a list of products keyed by their categories. I remember the last time I coded in C++ I used a whole lot of std::multimap to do just this. With C#, there isn’t such a container. […]
Object orientated code could break down dangerously when using static class members in an unorthodox manner. Static initialization sequence goes like this: 1. Program starts, mark all classes that has static members as statically uninitialized. 2. Enters a scope where static calls are made. 3. Check, in order of execution sequence, get the first class […]
In the case of binding a an object and its property to, say, a control using the feature will always work except when myObject is of the IEnumerable type. Once that happens, the data binding architecture will attempt to use the list of objects returned by the Enumerator for updating of UI and data source, […]
With a project that I am currently working on, I frequently need to display object information in a DataGridView. However, the values that needs to be displayed does not always directly belong to the bounded objects, instead, it is often a value related to the objects. Furthermore the DataGridView only accepts an IList of objects […]
To make the entire DataGridViewRow highlighted when the row selected is set to true, set the DataGridView.SelectionMode to FullRowSelect.