Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light

WPF TabControl - Binding

TabControl provides a ItemsSource property to bind list of items. ItemsSource takes any collection object which implements the IEnumerable interface. We bind TabControl with the List<T> or ObservableCollection<T> list classes. Below is the example TabControl binding with list of MyTabItem class. TabControl Binding Example Create a new MyTab...

Continue Reading

WPF Tab Control - Introduction

WPF TabControl is used for grouping multiple items that share the same space. TabControl consists of multiple TabItem controls. One one TabItem is visible at one time. A TabItem has two areas. Header Content Header is an area for specifying the header of TabItem. All Tab Items headers are always visible. Content is an area for specifying the child...

Continue Reading

C# Generic Methods

In my previous post, I explained about Generics. C# also provides Generic Methods. We can create a method which defer the parameter data type until the method is called. These parameters are called Type parameters that means we can pass the actual data type later. Below is the example of Generic Method. static void Swap<T>(ref T input1, ref T input2) { T temp =...

Continue Reading

C# Generics

Generics are introduced in C# 2.0. It is the most powerful features of C#. In C# 1.0, when we design a class that use other types that is not known at defining the structure of the class, then type should be an object type. In the class, we have to typecast the type using boxing and unboxing and then we can use the type. Generics introduced the concept of type parameters. Wi...

Continue Reading

C# Hashtable

C# Hashtable class is a collection class where we can store data in the key/value pair. Hashtable is not type-safe. Hashtable is not generic and both key and value are based on object type. Hashtable is used to store unique keys data. If we try to assign value to already used key, it just overrides the previous stored data. It is based on the Hashing algorithm&n...

Continue Reading

AJAX - AngularJS

Ajax is used for creating asynchronous web applications that get and store data from server without postbacks. In AngularJS $http object is used for get and post data from the server. $http use asynchronous techniques for interacting with server. A $http object returns a Promise object. A promise object represent a value that is not yet available. Its provides a then()...

Continue Reading

Chain of Responsibility Design Pattern

In Chain of Responsibility pattern, we create a chain of objects which handles a particular request. Each object contains a reference to his next object, if the object does not want to handle the request, it's simply forward the request to next object handler. When a object is ready for handling the request, it's does not forward the request to ...

Continue Reading

Command Design Pattern

Command design pattern revolves around a single object which encapsulate all the information to execute a method at later time. This command object contains a receiver object instance and a method pointer. A client can use command object with different parameters. Command object uses client parameters and execute the method on the rece...

Continue Reading

Controllers - AngularJS

AngularJS supports Model-View-Controller (MVC) architecture pattern. A Controller is a javascript object which has properties and functions. AngularJS Controller is the only object that communicates with both Models and Views. Controller Directive In AngularJS application, a controller directive is defined with ng-controller directive. <div ng-controll...

Continue Reading

C# ArrayList

C# ArrayList is a non-generic dynamic size collection class. ArrayList class exists in System.Collections namespace. ArrayList are dynamic means we can add any number of items without specifying the size of it. ArrayList vs Array ArrayList and Array looks same. But there are some major differences between them. Differences are: Array is fixed in size. We specify the...

Continue Reading

Join our newsletter and get an occasional email with a technology and dotnetpattern.com news update.