Wednesday, December 21, 2011

Create First WPF Browser Application

Posted by Rahul Kharde at 3:09 AM
Are you new to WPF? This article is help to understand and run your Browser application first time. We create a simple WPF Browser Application

In Microsoft Visual Studio Open menu File -> Project

Select “WPF Browser Application” Click “OK” Button

Here we have one textbox and Button

Page1.xaml

<Page x:Class="FirstExample.Page1"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="Page1">

<Grid>

<StackPanel>

<TextBox Margin="103,30,102,35" Name="txtName" Width="100">TextBox>

<Button Margin="103,50,112,145" Name="button1" Click="button1_Click" Width="100">Click Me..Button>

</StackPanel>

</Grid>

</Page>

Page1.xaml.cs

namespace FirstExample

{

public partial class Page1 : Page

{

public Page1()

{

InitializeComponent();

}

private void button1_Click(object sender, RoutedEventArgs e)

{

MessageBox.Show("Hello "+txtName.Text);

}

}

}

Output

Download

Download code here..



If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!


Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

0 comments:

Have any question? Feel Free To Post Below:

 

Popular Posts

Recent Comments

© 2011. All Rights Reserved | Help to understand .Net | Template by Blogger Widgets

Home | About | Top