Home » Programming » WPF » Story Details
Printable Version

Introduction of WPF

by Manish Tewatia on Jan 03, 2012

WPF is stand for Windows Presentation Foundation provides an unified model for producing high end graphical business application easily using normal XML syntax (known as XAML)
Comments: 0    Views: 202

Introduction:

WPF is stand for Windows Presentation Foundation provides an unified model for producing high end graphical business application easily using normal XML syntax (known as XAML) which runs both in client and server leveraging the job to render output more relying on graphics devices rather than using GDI components. It uses Direct3D rendering which employs graphics cards to render the output on the screen. Thus the drawing in the form will be smooth and also there is a chance to utilize the hardware capabilities installed in your machine. In case of traditional GDI forms application it is not possible to use advanced graphics capabilities and hence Windows Forms application will always be inefficient in comparison to WPF. Another important thing that I must address in this regard, GDI Windows forms application uses Operating system controls to build its application. Thus it is basically very hard to customize them in your own application. WPF controls are actually drawn over the screen and hence you can customize controls totally and modify their behavior when required.

Some Features of WPF:

  • New Property System & Binding Capabilities
  • Resource based Approach for every control
  • Redefine Styles and Control Templates
  • Built-In Support for Graphics and Animation

Example: simple design a button in WPF.

Code
<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width
="525">
   <Grid>
        <Button Content="X"  Height="19" HorizontalAlignment="Right" Margin="0,3,4,0"
          Name="button_close" VerticalAlignment="Top" Width="20" FontFamily="Courier"
          FontWeight="Bold" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
          FontStretch="Normal" Visibility="Visible"
          FontSize="14" Padding="0" ToolTip
="Close"/>
        <Label Content="Open"  Height="55" HorizontalAlignment="Left"
          Margin="42,64,0,0" Name="label_TabTitle" VerticalAlignment="Top"
          FontFamily="Courier" FontSize="12" Width="116" Background
="#FFE10064" />
        <Label Background="#FFE100C8" Content="Dispose" FontFamily="Courier" FontSize="12" Height="55" HorizontalAlignment="Left"
         Margin="243,64,0,0" Name="label1" VerticalAlignment="Top" Width="116" />
        <Label Background="#FFE1C864" Content="Close" FontFamily="Courier" FontSize="12" Height="55" HorizontalAlignment="Left"
        Margin="150,160,0,0" Name="label2" VerticalAlignment="Top" Width="116" />
    </Grid>
</
Window>

wpfffffffff.gif

Summary: Now in this example we have design a more then one button using a WPF tools. Before set a properties of button we have take grid control on a WPF form after that under the grid control we have set the all button properties. I hope above example help to you how to create a button in a WPF application.

 

 

 

Post a Comment
*
DevExpress PowerBuilder Web Development Windows Development Languages Software Engineering Databases
iPhone Architecture Secutiry UML & Modeling Operating Systems Networking Testing
Graphics Design Project Management Hardware Open Source Games Development Business Intelligence Visual Studio LightSwitch 2011
MonoDevelop Visual Studio 2010 ASP.NET HTML, DHTML XML PHP JavaScript
Silverlight Web Services WCF Windows Forms WPF Windows Services Dynamic Link Libraries
ActiveX COM, DCOM, ATL C# VB.NET C++ F# Java
Pascal SQL Server Oracle DB2 MS-Access Windows Servers Windows
Linux Unix SAP LINQ .NET Framework ADO.NET Reporting
Crystal Reports SQL Server Reporting Services Igenda Reports Active Reports Adobe Fireworks Arrays & Collections Hosting
Future Trends Android Windows Phone Smart Devices Business M&A Investment & Funding
Web Browsers Internet Explorer Firefox Safari Common Entrepreneurs Students
Consulting Wiki Gadgets MobileMe iCloud iOS Social Media
Facebook Twitter LinkedIn Google+ Microsoft Kinect XBox
Wii Playstation DirectX i OS OS X CIO, CTO, CEO Windows 8
Web Design Expression Blend 4 Photoshop CS5 Creative Suite 5.5 Expression Web 4 Expression Studio 4 Creative Suite® 5.5 Design
Creative Suite 5.5 Web Creative Suite 5.5 Production Startups Funding M&A Laptops Smart Phones
Desktops Cameras & Camcorders Netbooks Tablets Virtualization Microsoft Surface WordPress
Software Products Cloud Computing Current Affairs Technology TV TV
Earnings XAML E-Commerce MonoTouch Mono for Android Deals Electronics
Mobile Phone Laptop Tablet Book Computer Press Releases Reviews
Products Books Companies Windows Azure SQL Azure Interviews Mac
Web Browsers Symbian Windows Forms WPF Windows Services HTML 5 Office 365
SharePoint 2010 Exchange Server Adobe Visual Studio 2012 iPad Flex / Flash Games
Windows 9
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName