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

WPF ComboBox - Tooltip for each item

Many readers ask me a question regarding how we can add a tooltip for each item of ComboBox in WPF. Here I am presenting a very simple solution. In the below example, I am creating a simple combobox. ComboBox DataTemplate defines a ListBoxItem for each item in combobox. ListBoxItem has both Content and Tooltip property.  As we cannot use String.Format in Tooltip bi...

Continue Reading

C# Action

A delegate in C# represents a reference type that encapsulates a method. When we declare a delegate type we specify some parameters and a return type. We can only store those methods in delegates which has same parameters and same return type. Microsoft introduced some pre-built delegates so that we don't have to declare delegates every time. Action is one of the pre-b...

Continue Reading

C# Predicate

Predicate is a pre-built delegate in the .NET framework class library. Delegates are used to store method which has same parameters and return types as specify in the delegate type. Predicate is a generic delegate. It takes one parameter and returns a boolean value. Predicate delegate is used for check whether a parameter meets specify condition or not. ...

Continue Reading

C# Func

In Microsoft Framework class library, there are some built-in delegates. Action, Predicate and Func are some of them. I have explained Action and Predicate in my previous posts. Action and Predicate delegates has restrictions. Action delegate can take only parameters and does not return anything. Predicate delegate can take parameters but returns only boolean value. To ret...

Continue Reading

Introduction to AngularJS

AngularJS is the JavaScript framework for developing Single Page Applications (SPA).  It is an open source framework maintained by Google.  "Single page applications load the entire HTML on first load and then use AJAX to retrieve data from the server." AngularJS extends HTML with ng-directives attributes.  <html ng-app=”webapp&rdquo...

Continue Reading

Environment Setup - AngularJS

For create an AngularJS application, you need to include AngularJS javascript file into your application. First download the latest AngularJS javascript file. There are two ways you can include the AngularJS javascript file in your application. Download AngularJS javascript file directly from AngularJS site Include AngularJS javascript file from Google CDN ...

Continue Reading

Hello World Sample Application - AngularJS

An AngularJS application is divided into two parts: Application Bindings AngularJS Application An AngularJS application defines the section of HTML that starts the AngularJS application. We define the application using the ng-app attribute. You can add this attribute with any HTML element like body, div, table. <body> <div ng-app> <...

Continue Reading

Expressions - AngularJS

AngularJS expressions are used for display data from your Model to View. You can write expressions in double curly braces {{ expression }}. It is like one way binding from your Model to View and works just like ng-bind attribute. AngularJS expressions output the data where it is written. You can write expression with any numbers, strings, objects and arrays. A...

Continue Reading

Directives - AngularJS

AngularJS Directives are indicators to AngularJS compiler to attach some behaviour to HTML DOM elements. AngularJS comes with some built-in directives but you can create your own custom directive. Some main AngularJS directives are: ng-app ng-bind ng-class ng-init ng-model ng-switch ng-repeat ng-app Directive The ng-app directive is used fo...

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

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