All-In-One WPF Code Samples


All-In-One WPF Code Samples

Introduction

Windows Presentation Foundation (WPF) provides developers with a unified programming model for building rich Windows smart client user experiences that incorporate UI, media, and documents. The All-In-One WPF code samples demonstrate the typical programming topics about WPF. These topics are either frequently asked in MSDN forums and Microsoft Support, or are requested by many developers via our code sample request function. We want to alleviate the frustration felt by developers when they are developing WPF projects.

 

Visual Studio 2008 Code Samples

Sample Description Download ReadMe
CSWPFAnimatedImage The WPF code sample demonstrates how to display a series of photos just like a digital picture frame with a “Wipe” effect. Download ReadMe.txt
CSWPFAutoCompleteTextBox The code sample demonstrates an easy implementation of AutoCompleteTextBox in WPF. Download ReadMe.txt
CSWPFCascadeDataGridComboBoxColumns The code sample demonstrates how to show cascaded data in two combobox controls in DataGrid Download ReadMe.txt
CSWPFClipboardViewer This code sample demonstrates how to monitor Windows clipboard changes in a WPF application. Download ReadMe.txt
CSWPFDataBinding This project demonstrates the basics of Data Binding in WPF. The sample provides both procedural code and XAML code for implementing data binding Download ReadMe.txt
CSWPFMasterDetailBinding This sample demonstrates how to implement master/detail data binding in WPF. Download ReadMe.txt
CSWPFMVVMPractice The code sample demonstrates how to implement the MVVM pattern in a WPF application. Download ReadMe.txt
CSWPFNavigationUsage The sample demonstrates navigation usages in a WPF application. Download ReadMe.txt
CSWPFPaging The sample demonstrates how to page data in WPF. Download ReadMe.txt
CSWPFThreading The code sample project illustrates two WPF threading models. Download ReadMe.txt
CSWPFTwoLevelGrouping The sample demonstrates how to display two-level grouped data in WPF. Download ReadMe.txt
VBWPFAnimatedImage The WPF code sample demonstrates how to display a series of photos just like a digital picture frame with a “Wipe” effect. Download ReadMe.txt
VBWPFAutoCompleteTextBox The code sample demonstrates an easy implementation of AutoCompleteTextBox in WPF. Download ReadMe.txt
VBWPFCascadeDataGridComboBoxColumns The code sample demonstrates how to show cascaded data in two combobox controls in DataGrid Download ReadMe.txt
VBWPFClipboardViewer This code sample demonstrates how to monitor Windows clipboard changes in a WPF application. Download ReadMe.txt
VBWPFDataBinding This project demonstrates the basics of Data Binding in WPF. The sample provides both procedural code and XAML code for implementing data binding Download ReadMe.txt
VBWPFMasterDetailBinding This sample demonstrates how to implement master/detail data binding in WPF. Download ReadMe.txt
VBWPFPaging The sample demonstrates how to page data in WPF. Download ReadMe.txt
VBWPFThreading The code sample project illustrates two WPF threading models. Download ReadMe.txt
VBWPFTwoLevelGrouping The sample demonstrates how to display two-level grouped data in WPF. Download ReadMe.txt

Visual Studio 2010 Code Samples

Sample Description Download ReadMe
CSWPF3DMultiTouch The code sample demonstrates using WPF 4’s support of multi-touch events to manipulate a 3D scene. Download ReadMe.txt
CSWPFCascadeDataGridComboBoxColumns The code sample demonstrates how to show cascaded data in two combobox controls in DataGrid Download ReadMe.txt
VBWPF3DMultiTouch The code sample demonstrates using WPF 4’s support of multi-touch events to manipulate a 3D scene. Download ReadMe.txt
VBWPFCascadeDataGridComboBoxColumns The code sample demonstrates how to show cascaded data in two combobox controls in DataGrid Download ReadMe.txt
VBWPFMVVMPractice The code sample demonstrates how to implement the MVVM pattern in a WPF application. Download ReadMe.txt

Download all code samples: http://1code.codeplex.com/releases

 

Submit your request of WPF code samples (Guidance)

Comments (36)

  1. Juan says:

    Very interesting package, It is very helpful when you need to find some code !

    InSeCla Forum Software

    An open source ajax asp.net forum software, featuring JS instant pagination, InstantOn and being the world first unique to bring multi-lingual forums publications

  2. saman says:

    iam can not speak englesh.

    you are help me for wpf progect?

    help understand help me

    omed1414@gmail.com

  3. Manikandan says:

    Hi,

    I need a WPF VB.NET Code for Loading a new WPF Form. Form handling samples required.

  4. Abhiit says:

    I want to learn WPF and want to develop application which should be with best GUI.

    Please let me have sample application so I can get help from it.

  5. sunder says:

    hi i am new to wpf how to manage user session in wpf plz need some help

  6. Anil kumar says:

    Could you please post the Code samples using VB language.

  7. Raghunath says:

    i need the samples very urgent. Please forward to raghunath1230@gmail.com

  8. Edmond Casenas says:

    Hi, I would like to request about EntityFrame 4 or 5 using T4 Generated POCO C-Sharp Class and use to UnitOfWork, Repostory, DataLayer and Business Layer, In a simple manner way of example. . . Thanks. . .

  9. Edmond says:

    Hi, I would like to request about EntityFrame 4 or 5 using T4 Generated POCO C-Sharp Class and use to UnitOfWork, Repostory, DataLayer and Business Layer, In a simple manner way of example. . . Thanks. . .

  10. TOMSLY JOSEPH says:

    I need the code sample that demonstrates how to implement the MVVM pattern in a WPF application.

    Kindly send me to my email  : tomslyjc@gmail.com

  11. Ashish Ruikar says:

    Hi request you to send me the code sample.

  12. alex says:

    what's the point if they can't compile.  

  13. vilas jadhav says:

    Dear sir,

    I want to develop sample application with Ms Access. Please send me any sample with MS Access

    thanks

    Vilas jadha

    jadhav_vilas84@yahoo.com

  14. Niesh Sonawane says:

    Please send me all code samples for WPF using C# 2008 at sonawane.nilesh27@yahoo.co.in

  15. santosh says:

    please send me all samples code to me @ santosh.pothankar@gmail.com

  16. riya says:

    how to connect to the database with wpf using dataset?

  17. Fadhli says:

    Hi,

    How to do animation for a pinpoint jumping? It's for a map which a pinpoint will continuously jump up and down at the same place which notice public of the location of what they search for?

  18. purna shruthi says:

    Please send me all code samples for WPF using C#.net 2010 at purna.shruthika@yahoo.in

  19. jhed brion says:

    Hi,

    I just to ask if you have sample project will multiple connection string using wpf as the UI?

    I want to request a copy of your sample project if possible.

    You can send it to knightfury28@live.com if the request is possible.

    Thank you very much….

  20. giji says:

    need code for drag and drop from a datagrid to another in vb.net

  21. ashish says:

    how we show sum of any column of datagrid in the textbox

  22. Aditya Varma says:

    Can u please help me to display the selected date from calender tool to the label using WPF

  23. Punit sharma says:

    sir i want you help me

    i make a mobile shop window application for a mobile delar plz you send me a sample code this application    

    on thi email address spunit788@gmail.com

  24. srihari says:

    A form which takes in an account name as a string and an access key as a string, an image file from his desktop and then has an upload button which calls a function that connects to that account and uplaods the image file.

  25. rockstar says:

    A form which takes in an account name as a string and an access key as a string, an image file from his desktop and then has an upload button which calls a function that connects to that account and uplaods the image file.

  26. Mayur says:

    I want to upload document using wpf..please give some example

  27. mstn says:

    i need a wpf test project for WPF testing&starting

  28. oscar says:

    Hi. I need help with graphics objects over a bmp , editable objects, insert, delete, and saving. Thanks

    oerich@hotmail.com

  29. montosh says:

    pls send complete MVVM in WPF Source Code

  30. Anonymous says:

    please share samples to me on rahulkumarscriet@gmail.com

  31. Anonymous says:

    This path from app.config file

    public MainWindow()

    {

    InitializeComponent();

    FillDataGrid();

    }

    private void FillDataGrid()

    {

    string ConString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;

    string CmdString = string.Empty;

    using (SqlConnection con = new SqlConnection(ConString))

    {

    CmdString = "SELECT emp_id, fname, lname, hire_date FROM Employee";

    SqlCommand cmd = new SqlCommand(CmdString, con);

    SqlDataAdapter sda = new SqlDataAdapter(cmd);

    DataTable dt = new DataTable("Employee");

    sda.Fill(dt);

    datagrid1.ItemsSource = dt.DefaultView;

    }

  32. Anonymous says:

    ======================  WPF ====================

    using System.configuration

    references… System.Configuration

    Please I need wpf code for app.config in visual studio 2013

    insert – delete – Update – select from database SQL 2008

    but…

    the event handler in code behind should be only like this code…

    public MainWindow()

    {

    InitializeComponent();

    FillDataGrid();

    }

    private void FillDataGrid()

    {

    string ConString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;

    string CmdString = string.Empty;

    using (SqlConnection con = new SqlConnection(ConString))

    {

    CmdString = "SELECT Student_ID, StudentName, StudentClass, hire_date FROM StudentTable";

    SqlCommand cmd = new SqlCommand(CmdString, con);

    SqlDataAdapter sda = new SqlDataAdapter(cmd);

    DataTable dt = new DataTable("Employee");

    sda.Fill(dt);

    datagrid1.ItemsSource = dt.DefaultView;

    }

    Student_ID .. should be an Identity with Primary Key.

    the problem is …

    Exception has been thrown by the target of an invocation

    I need 'codesample.rar' with database connected to same path in app config file to solve the error

  33. Srinivas email is srinumarti@hotmail.com says:

    please send latest  wpf samples  covering all areas in wpf.

  34. Shrikant Jadhav says:

    I need code for document scanning using wia with Smart Client Application Architecture Visual Studio 2012 using C#.

  35. waleed says:

    how to work in layer in wpf c# ?

    i want a project of wpf c# . small project can i get it ??

  36. waleed says:

    i want a small project in wpf c# . please someone send to me at

    waleed.ahmed.cs@gmail.com