Sunday, July 9, 2017

WPF with XAML and C# - Introduction

WPF - Windows Presentation Foundation
XAML - Extensible Application Markup Language

 WPF is used in development of windows application and also enterprise application with c#. You can be used visual studio to build wpf application.  Xaml is also used with the development of wpf application.  XAML is the language behind the visual presentation of an application that you develop in Microsoft Expression Blend, just as HTML is the language behind the visual presentation of a Web page. (What is XAML?)


 Starting with Hello world application


  1. Open Visual studio -> File -> New -> Project -> Under visual c# -> you can select WPF Application and give project name as "HelloWPF" or any name as you want.  
  2. Then it will be created two main files. one is with .xaml extension (MainWindow.xaml) and other one is with  .xaml.cs extention (MainWindow.xaml.cs)
  3. You can easily edit your xaml file with provided toolbox and properties in vs or manually editing it as appropriate way.
  4. Below is the sample screen shot of xaml file.

    This is the xaml file of Hello world wpf application


  5. Now you can run the application.  See you in next part of this series.
(Layout and Panels - Part 2)


No comments:

Post a Comment