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

WPF Tab Control - TabStripPlacement

TabStripPlacement is an important propety of TabControl. It is used for setting the Header alignment relative to tab content. You can set below four values in TabStripPlacement. Left Top (Default) Right Bottom I have given all four examples of TabStripPlacement. Left Set header to left position like below: <TabControl x:Name="TabC...

Continue Reading

WPF Tab Control - Templates

WPF TabControl provides two templates property for changing the UI for Header and Content area. ItemTemplate - Get/Set DataTemplate for TabItem Header. ContentTemplate - Get/Set DateTemplate for TabItem Content. ItemTemplate ItemTemplate is used for changing the DataTemplate of Header section of TabItem. By default, Header DataTemplate call the ToString meth...

Continue Reading

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

SQL Server Interview Questions Series - Part 2

22. What is SQL Server Trigger? A trigger is a special stored procedure which automatically executes when you execute any insert, update, or delete commands on table or view. 23. Can we execute a Trigger directly? No 24. How many types of Triggers available in SQL Server? There are two types of Triggers: Instead-of Trigger After Trigge...

Continue Reading

SQL Server Interview Questions Series - Part 1

1. What is SQL Temporary Table? A temporary table is a table which developer creates at runtime only for the scope of a query or for the scope of the connection. You can do all CRUD operations on the table. There are two kinds of temporary tables: a. Local temporary table b. Global temporary table Local temporary table: This table is available only ...

Continue Reading

SQL Server Interview Questions Series - Part 3

43. What is the function name for getting the current date in SQL Server? We can use GETDATE() with SELECT statement for getting the current date. SELECT GetDate() 44. Print the name of distinct employee whose date of birth is between 01/01/1950 to 12/31/1970. SELECT DISTINCT Name FROM Employee WHERE DOB BETWEEN '01/01/1950' AND '12/31/1970'...

Continue Reading

C# Reflection Introduction

Reflection in C# is a big topic in itself. I'll summarize a little list of what you can do with reflection. Get currently executing assembly, load assembly, get assembly from type Get classes declared in assemblies Get methods, properties, fields, events, constructors declared in classes Check access modifiers of classes, properties, fields and me...

Continue Reading

Start with MVVM Light Toolkit

MVVM Light toolkit is a lightweight toolkit for MVVM.  This toolkit provides very basic classes for developing your application in MVVM architecture. You can download the latest MVVM Light Toolkit from here. MVVM Light Toolkit comes with 2 main DLLs. GalaSoft.MvvmLight.dll GalaSoft.MvvmLight.Extras.dll Main classes in GalaSoft.MvvmLight.dll are:...

Continue Reading

MVVM Light Messenger

MVVM Light Messenger is a class that allows exchange messages between objects. Messenger class is mainly used for sending messages between viewmodels. Messenger class decreases coupling between viewmodels. Every viewmodel can communicate with another viewmodel without any association between them. Messenger is an implementation of Mediator pattern in MVVM Light tool...

Continue Reading

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