WPF validation using INotifyDataErrorInfo

In this article I will discuss about INotifyDataErrorInfo which is used to validate the data asynchronously in WPF. In my previous articles I have discussed about the ways to validate data entered in the UI.

Continue reading

WPF validations using IDataErrorInfo

In my previous article I have discussed about the first two ways out of total four ways by which we can perform WPF validations. In this article I will discuss the validation using IDataErrorInfo.

Continue reading

WPF Validation with Examples – Part 1

In this article I will discuss all the ways in which we can validate data in the WPF application. The various WPF validation techniques are as following.

Continue reading

WPF Self and AncestorType Relativebinding in DataGrid

In this article I will discuss about the Relativebinding in WPF with C# code example. This type of binding can be used as an alternative to the data context binding. This binding makes the binding bit easier.

Continue reading

UWP Architecture

Welcome to the UWP World

With the new releases of the .NET platform and Visual studio, I was bit afraid being a WPF and XAML programmer as there was nothing new happening in windows side. But with the release of Windows 10 and introduction of UWP there will be great scope for XAML developers in the coming time. Lets get introduced to the UWP world in this small introductory write up.

Continue reading

Different Ways to Bind WPF View And View Model

How to bind View and View model in WPF or how to set DataContext of View? In this article I will discuss about the different ways to bind the View and View Model in WPF. In one of my article I have discussed about the MVVM pattern in the WPF and its various components (i.e. View, View Model and Model). If you want to learn about the data binding in WPF you can learn here. This article I have developed using C# language.

Continue reading

Search, Group ListBox Items Using CollectionViewSource

Have you ever tried of searching the items in ListBox without any button event? In this article we will see how to search Filter the Items in the WPF listbox using CollectionViewSource. In the first part I will discuss about the CollectionViewSource. It’s functionalities and features followed by its working. Then I will use CollectionViewSource to search as well as group items in ListBox as an example. This example can be duplicated for all the items control of WPF  like combobox, datagrid etc.
Continue reading

WPF MVVM Practical Data Application

In this article I will discuss about the WPF MVVM(Model-View-View Model) design pattern. I will create a simple data driven application in WPF which will use MVVM pattern. I have used C# language and Visual Studio 2015 Community to develop the application. I have also used Entity Framework to interact with data base. First I will discuss about the MVVM and its uses. Then I develop a simple CRUD application using the MVVM concepts.

Continue reading

Learning WPF – Using IValueConverter with Code Example

In this article I will discuss about the IValueConverter interface of the WPF framework which is present in the PresentationFramework assembly. I will discuss about the syntax of using the IValueConvertor with binding class in the XAML with code example. Moreover if you want to learn about the binding in WPF you can check my this article and for binding modes this article.

Continue reading

Updating the source using UpdateSourceTrigger(WPF)

In my previous post I have discussed about the data binding and data binding mode in WPF. In this article I will discuss about the UpdateSourceTrigger which provides the synchronization timing among the of source and target data binding with code examples.

Continue reading

Data binding Modes with WPF Examples

Data binding Modes

In my previous article I have discussed about the data binding in WPF and how we can bind the data provided to the UI elements of WPF. In this article I will walk you through the data binding modes present in WPF with sample code examples.
Continue reading

Data binding making easier in WPF

Data binding in WPF

In this article I will discuss about the DataBinding in WPF. How we can achieve data binding at different levels in applications using the datacontext property and how it can be helpful for us to have a solid understanding of datacontext if we are working with property of one type present in the parent class.

Continue reading

Bubbling, Tunneling and Direct routed events

Events in WPF Introduction

In this article I will discuss about the event types in WPF. The type of events in WPF are Bubbling event, tunneling event which are routing events and direct event. I will also describe each of these events with example of each.

Continue reading

IsSelected for ListBoxItem(WPF) Template

ListBoxItem ControlTemplate

In this article I will show how we can change the ListBoxItem template for a ListBox in WPF to have a button functionality for the same where we can raise the OnClick() event as well as attach a Command to it.

Continue reading

INotifyPropertyChanged without property name

PropertyChanged Event using INotifyPropertyChanged

In WPF whenever we bind our view to the view-model class, there is always a need to propagate the changes in the view model to the UI. This is usually done by implementing the INotifyPropertyChanged interface to the view model class and subscribing to the raising the PropertyChanged event if any of the property is changed in the VM class.

Continue reading

Add/Edit/Delete DataGrid Using Master-Details View WPF

Add/Edit/Delete Introduction

In my previous article I have shown how to just display data from Database using the Linq to SQL. In this article I will show how to add, edit and delete the data from the datagrid in WPF using the Linq to SQL and BindingListCollectionView without much of the code behind coding.

Continue reading

DataGrid binding using Linq To SQl WPF

In this article I will discuss how to retrieve the data from a database source and bind to a datagrid in WPF using Linq to SQL. The article is for the beginners who want to learn how to bind the data from database using the Linq To sql (dbml)file as DataContext and ObjectDataProvider in the WPF forms without doing any coding in the code behind file.

Continue reading

Working with WPF Templates

WPF Templates

What is a template in laymen’s term? A template is a shape or mold which we can apply on a  look less or some randomly shaped piece of some object. E.g. suppose we have some randomly shaped clay and we want that clay to attain some shape may be like circle or triangle. This we can achieve by having a pre molded iron shape and pressing hard on that clay by keeping the other properties of clay intact such as hardness. WPF templates help us to achieve the same functionality. The controls in WPF are basically look less or they have some pre-defined shape which we may want to change in some scenario.

Continue reading

LayoutTransform and RenderTransform in WPF

Understanding Tranformation(LayoutTransform and RenderTranformation)

Transformation helps us to map points of a particular shape or element from one coordinate space to another coordinate space. There can be many cases where we want to incorporate some animations in the WPF application. These animations can be incorporated with the help of transformations.

A transformation can be used on an element to

Continue reading

Understanding MeasureOverride and ArrangeOverride

MeasureOverride and ArrangeOverride

To build an effective and appealing UI in WPF we should be aware of the layout process which takes places while creating the controls and in turn to understand the layout process we should be aware of the MeasureOverride() and ArrangeOverride() methods of the FrameworkElement class which can in turn help us to create custom panel in WPF.


Continue reading