Introduction

I started on this issue when I had my WCF service times out when I am trying a normal socket connection. This was running fine in windows 8. We had a keep-alive WCF call which tells the server that the client is still active. For this we need the port sharing to be enabled on the machine. I was on an impression that the port sharing was not working and because of which it fails. From the log I came to a conclusion that the keep alive was failing so this made me doubt the TCP port sharing. But I could also see that when I install visual studio, then the application works. This made me doubt the .net framework. Finally I detected the slow network. This was the real culprit.

Continue Reading ...

Introduction

In this post we will see how we can identify if the application has been maximized or it is restored to normal state. We will use the Resize event equivalent in WPF which is SizeChanged event. We will subscribe to this event and will check the window state to identify if the window has been maximized or it is restored to normal.

Continue Reading ...

Introduction

There are scenarios where we have to show a standalone message box even before the application main window is launched. In such scenario, we need to do something different. Say if we have a composite application with a bootstrapper, and we want to show some error while running a bootstrapper, it may look difficult because we don’t have a parent window. In such scenario, we can show the message box as shown below.

Continue Reading ...

Introduction

It is important that we test an application in all network conditions. This is because we may want to put demand on a system or device and measure its response to determine a system’s behavior under both normal and anticipated peak load conditions. This makes sure that the application is robust enough to handle all the network conditions before we roll out to users. It would be a painful task to do this kind of testing without the help of any software which hook up the adapter and controls the packet flow. In the absence of such software we will have to manually pull the network wires every time. Also this approach won’t help us test the spiky network conditions. To help us in these testing we have a tool which is called Network Emulator for Windows Toolkit (NEWT). In this article we will see how to configure and use Network Emulator Toolkit to test an application in limited network bandwidth.

Continue Reading ...

Introduction

WPF applications support rich media and graphics, this require styles and styles can be reusable across different window or element in WPF. Here we need a mechanism by which we can share this style across different window or say application. By adding the style in application resource file, we can share it across windows in application but not across application. Here reusable styles need to be utilized and in a managed way. Here WPF provide an easy way to manage these styles and other reusable resources which can be used across WPF windows and across application. This is called Resources Dictionary. We can define the styles in WPF XAML files and can manage all our useful styles for a particular application in a resource dictionary file. This resources dictionary can then be referred from other WPF projects and can use the styles in this resources dictionary in that project.

Continue Reading ...