Click here to Skip to main content
15,897,518 members
Articles / Desktop Programming / WPF

WPF Introduction: Databinding + Styles + IValueConverter

Rate me:
Please Sign up or sign in to vote.
4.20/5 (12 votes)
5 Aug 2009CPOL5 min read 79.1K   939   23  
A small introduction about Listview Databinding and Styles with introduction to IValueConverter interface
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ListViewDataBindingSample
{
    public class EmployeeData
    {
        private int _empID;
        public int EmpID
        {
            get { return _empID; }
            set { _empID = value; }
        }

        private string _empName;
        public string EmpName
        {
            get { return _empName; }
            set { _empName = value; }
        }

        private string _designation;
        public string Designation
        {
            get { return _designation; }
            set { _designation = value; }
        }

        private bool _isManager;
        public bool IsManager
        {
            get { return _isManager; }
            set { _isManager = value; }
        }

        private int _age;
        public int Age
        {
            get { return _age; }
            set { _age = value; }
        }

        public EmployeeData(int empID, string empName, string designation, bool isManager, int age)
        {
            EmpID = empID;
            EmpName = empName;
            Designation = designation;
            IsManager = isManager;
            Age = age;
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
India India
Working in a software development company specializing financial products as Senior Developer. Interested in WPF, WCF, C# and C.

Comments and Discussions