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

How to Remove Row/Column Header in WPF DataGrid?

WPF DataGrid provides a HeadersVisibility property to hide Row Headers and Column Headers. HeaderVisibility possible values are: All - Both row and column headers are visible. Row - Only row headers are visible and column headers are hidden. Column - Only column headers are visible and row headers are hidden. None - Both row and column headers are hidden. ...

Continue Reading

WPF DataGrid Introduction Tutorial

WPF DataGrid control is used for display and edit tabular data in rows and columns. DataGrid control is introduced in .NET 4.0. DataGrid control main features are: Bind to any collection that implements IEnumerable interface Auto generate data rows and columns based on bounded data. Provides different row selection-modes: Single/Extended Provides options for grou...

Continue Reading

WPF DataGrid - Selection Mode

WPF DataGrid provides different properties to select, unselect different rows and columns of grid. Single/Extended The SelectionMode property is used for selecting single/multiple row and columns. This property is an enum which have two values: Single Extended (Default) Single Single allows you to select only one row or column in the DataGrid. Colum...

Continue Reading

WPF Dispatcher - Introduction and How to use?

Before we learn what is dispatcher and why we need it, we need to understand what is the apartments of the Thread. Thread Apartments All objects in the process are grouped into Apartments. There are two types of apartments in Threads: Single-Threaded Apartments Multi-Threaded Apartments Single-Threaded Apartment (STA) Single-threaded apartments cont...

Continue Reading

WPF GridSplitter

WPF GridSplitter control gives user to resize the columns width and rows height. WPF Grid divides available space in rows and columns. When we define the RowDefinitions and ColumnDefinitions, we specify how much space a particular row or column should take. A user has no option to resize width and height later. In the below example, I have divided the Grid into two colu...

Continue Reading

WPF Interview Questions for Beginners & Advanced - Part 1

1. What is WPF? Windows Presentation Foundation (WPF) is a successor of Windows Forms. WPF is a UI presentation framework for developing Windows based applications. It uses the DirectX technology for rendering their controls on the screen. 2. What are the features of WPF? WPF main features are: WPF is resolution-independent. It uses the hardware accel...

Continue Reading

WPF Interview Questions for Beginners & Advanced - Part 2

21. How can we find resources from ResourceDictionary and apply on controls? ResourceDictionary stored resources as key value pairs and you have a method called FindResource in every control to find the resource from the ResourceDictionary. Every resource is stored as reference type so you have to cast the object to the original type. btn1.Background = (Brush)btn1.Fi...

Continue Reading

WPF Interview Questions for Beginners & Advanced - Part 3

41. What is Markup Extension in WPF? Markup Extension decides at runtime how to set a property value. StaticResource, DynamicResource are examples of Markup Extension. Markup Extension are always comes in curly braces { }. The first word inside the curly braces is class name of Markup Extension. 42. How many types of Markup Extension exists in WPF? There are tot...

Continue Reading

WPF Interview Questions for Beginners & Advanced - Part 4

61. How can you obtain the SynchronizationContext class? You can use the static property SynchronizationContext.Current property from the UI thread. 62. How many methods are available in SynchronizationContext class? There are two methods: Post Send 63. What is the difference between Send and Post methods in SynchronizationContext class? Post method...

Continue Reading

WPF Interview Questions for Beginners & Advanced - Part 5

81. What is Property-based Animation in WPF? WPF introduces a property-based animation techniques to make animations in WPF easy. It simply modify the value of control property over an interval of time and the target property must be a dependency property. 82. How many types of Animation support by WPF? There are baiscally three types of Animation classes. ...

Continue Reading

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