Friday, 12 December 2014

Introduction      In this article I am presenting a custom wizard control which supports MVVM approach. Here we will see how to use this control also we will see the features this control exposes. You can download this control from Github page. Contribution to this control will be appreciated. Also you can download the complete solution which makes use of this control from here. Once the wizard control is implemented,...

Wednesday, 10 December 2014

Introduction In telerik WPF radgridview, when we apply grouping, we can find that some groups will automatically expand even if there is no user interaction. This mostly happens in scenario when there is some value change in rows which are grouped. This will also happen in other scenarios as well. This is a known bug in telerik radgridview at the time when this post is posted. In this post you will find out how to block this bug with the help of a custom behavior. Here we will make use of mouse click event and GroupRowIsExpandedChanging events....
Introduction In this post, we will find out how to find the group, if grouping is applied on the radgridview, in which the event occurred. Or how to find if the row clicked is group row or not. If you have subscribed to the mouse click event properly, you will get call to the delegate which is registered to the click event. You can refer to this post for proper subscription of mouse click event. Now if you are getting calls to the delegate, then it is easy to find the row in which the event occurred, you can refer to this post to find out...
Introduction If you are able to subscribe to a mouse click event on a radgridView, then your immediate requirement could be to find the row in which the mouse click event occurred. In this post we will see how to achieve this. If you are not subscribing to mouse click event properly, then you can refer to this pos...

Tuesday, 9 December 2014

Introduction Subscribing to a row click event is not straight forward in WPF Telerik RadGridView. In this post we will see how we can achieve this. Subscribing to a mouse click event would have been straight forward if all the rows were available at the time of gridview loaded event. But as in most scenarios, not all rows are available at this time, so when you subscribe to a normal Mouse Click event, only a click on the Header row will trigger the events. As the GridView can be updated with values at a later stage, it is not easy to subscribe...

Thursday, 23 October 2014

Introduction    I was trying to use SQlite Backing Store for my Enterprise Library Caching block. When i try to run my application I started getting an exception an it was like this System.ArgumentException was unhandled Message=The type 'Microsoft.Practices.EnterpriseLibrary.Caching.Database.DataBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching.Database, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be resolved. Please verify the spelling is correct or that the full type name is provided. How...
Introduction    I was working on a project which uses Enterprise Library to store cache data to database backing store and I encountered an exception as Activation error occurred while trying to get instance of type ICacheManager. I believed I have the entire configuration done properly. But there was one important configuration missing. In this post we will see how to fix the exception which occurs while using Enterprise library to cache or log data to backing store say database or any backing store. This happens when we try to use...

Monday, 1 September 2014

This could be one of the required features if you are working on WPF. But this won’t work without some additional work. Here in this post we will see how we can drag and drop items from RadTreeView to RadGridView. This is achieved with the help of behavior...

Tuesday, 26 August 2014

Introduction Worried over this exception? This happens when you haven’t set the Path= on binding. By default WPF binding will take the Path= part by default. But on controls which have a two way binding by default, this seems to be not working. You may have to set it explicitl...

Thursday, 21 August 2014

TextWrapping is required when your text to display has to align itself inside a control. TextWrapping should work seamlessly when your control is of fixed height and width. But this won’t be the scenario in all cases. When we have a dynamic parent control whose width and height cannot be predicted, we would like the TextBlock which is placed inside it to adjust itself to fit into the container. In this case we would prefer to have TextBlock decide on the height and width based on the parent control. So we won’t set any width or heigh...

Wednesday, 23 July 2014

Introduction Service has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element. This can happen if there is no proper endpoint configured for the servic...
Introduction Here we will see how to fix the exception, the .Net Framing mode being used is not supported by 'net.tcp://....' See the server logs for more details...
Introduction If you are using netNamedPipeBinding for your communication then you may get an exception like “There was an error reading from the pipe: Unrecognized error 109 (0x6d)...
Introduction This fix is helpful if you are using WCF streaming and you got this exception while transferring huge file using data contract. If you are using streaming and the stream is transferred to or from WCF service, then you will get an exception like “There was an error while trying to serialize parameter http://tempuri.org/:fileStream. The InnerException message was 'Type 'System.IO.FileStream' with data contract name 'FileStream: http://schemas.datacontract.org/2004/07/System.IO' is not expected. Consider using a DataContractResolver...
Introduction  In this article we will see how to transfer a huge file to and from WCF services efficiently. WCF supports streaming of data. We will use streaming to transfer huge file efficiently to and from a WCF service. This article is all about transferring file using streaming transfer mode in WCF and it does not enforce you to use streaming always, because of its limitation...
Introduction  In this article, we will see how to create a simple WCF service. Then we will see how to host this WCF service in a console application with so called self-hosting. After that we will see how to expose service metadata via MEX endpoint. After that we will see how to create a proxy for the WCF service which has net.tcp and net.pipe endpoints using visual studio 201...

Thursday, 10 July 2014

It is often a requirement when we use RadSplitContainer and we want to set width or height to RadSplitContainer. Here in this post we will see how to achieve this. When we use RadSplitContainer, we would like it to occupy a small space initially and if required we can drag it to take more space. This is normally achieved by setting the width for the control. If we are using two RadSplitContainer and if we wish to set these RadSplitContainer widths in 1:3 ratios, we may not be able to achieve this easily if you are not an expert in it. So here...

Thursday, 26 June 2014

 RadPane in telerik controls can show a header. We normally use the Header property to set the header for RadPane. This works most of the time. But in some scenarios, say for example when we use nested RadPane, this kind of usage doesn't seem to work. The header suddenly disappears. This is a know issue in teleri...

Wednesday, 25 June 2014

Varnish is an HTTP accelerator or so called reverse proxy. Varnish is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as though they originated from the server or servers themselves. Varnish then caches those pages whose expiry header is set to some future date. This means those pages which won’t change until that date. Mostly static pages in a site will have expiry header so the next time when a client requests a page, varnish will look at the header...

Friday, 9 May 2014

Issue: At times we will face with a situation where we need to show an image from another project in the same solution. Say for example: If you are building an enterprise application then we will modularize the application. And at times we want to show some image from this module in the main shell view. This at times can run you crazy. Here we will see how to show an image from a different module in the shell vie...

Wednesday, 16 April 2014

Issue: Often we face a situation where we have defined a DataTemplate and we need to bind to a property, most often to a Command in ViewModel. To achieve this we will define the binding and will set a RelativeSource for that binding which in some cases can ends up in an error like this. BindingExpression path error: … property not found on 'object' … BindingExpression:Path=… DataItem...

Sunday, 13 April 2014

Issue: When I was developing some XAML page, I encountered one situation where I experienced some intermittent bug from WPF. Some of my buttons will go disabled at times even if the CommandParameter bind to a buttons command has proper value to enable button. Below is the solution for thi...
Issue:  You all may have experienced an annoying behavior of visual studio while developing WPF XAML. Say for example Visual Studio consumes large amounts of memory and shows Not Responding message on a regular basis while designing XAML This is because of the XAML designer (Microsoft Visual Studio XAML UI Designer) which visual studio loads while editing XAML. There will be one for each XAML that you open for editin...
Issue: While in the process of module initialization, if there is any error in a module, then PRISM will throw exception and will stop loading other modules until you fix the error in the module. But if your module is not really important in your application, you would like to suppress this module initialization error and continue loading other module...
Issue: You can achieve this with the help of Behavior in WPF. Create one multiselect behavior and attach it to RadGridView. This way you can avoid any code behind code altogether and can implement multiselect in proper MVVM wa...
Issue:  How to Sort RadGridView in ascending order based on a column value when it is loade...
Introduction      Here in this article I am introducing a WPF IP-Control. This control is a simple to use IP-Address control made out of WPF text box control. You can use this IP-Address control in any Microsoft WPF/Silverlight application. This control is inherited from TextBox control. This can be used like any text box control. But the display will be rendered to look like an IP-Address control. Below...
Introduction: In this article you will see how to implement multiselect in WPF DataGrid in proper way when you are following MVVM pattern. In this article you will see how to implement a behavior to your DataGrid so that we can achieve multiselect. Behaviors are introduced with Expression Blend, to encapsulate pieces of functionality into a reusable component. These components can then be attached to controls to give them an additional behavio...
Issue:  WPF Controls like DataGrid have default shortcut keys. For example, if you try to select any row and press Delete button then the grid row will be deleted. This is the default behavior. We can disable it in MVVM way by using InputBindings. InputBindings represents a binding between an input gesture and a comman...
Issue:  When you create an enterprise application, Keyboard shortcuts are a must. Enterprise applications will need keyboard shortcuts to execute certain actions in controls which are possible only by using mouse. Keyboard shortcut is different from keyboard access key where it will help you to get the focus on to control. Here we will use InputBindings to achieve this. InputBindings represents a binding between an input gesture and a comman...