- Open visual studio 2008 IDE
- File>New>Project(Open New dialog box)>visual c#(Select)>Wpf Application(Select)
- Now in the Designer window (Window1.xaml) find the following line 'Title="Window1" Height="300" Width="300">' Edit Title name
like 'Title="Helloworld" Height="300" Width="300">' then save it and press F5 button(ur application will be run)[Note:Title,indicate the title bar name.Height,width,indicate ur application or form size.]
- For practice purpose just right click ur application and try different properties of form (like chang Backgroun,Bitmap effect etc)
- click on form and goto Toolbox(Double click on Button),New Button will be added in our container form
Or
Add followin line Before '<Button height="23" horizontalalignment="Left" margin="10,10,0,0" name="button1" verticalalignment="Top" width="75">Button </Button >'
[Note:'Width="75">Button </Button >'replace this code with '
Width="75">Hello </Button >' Also right click on button and click on properties and change different properties.]
- Then Double Click on Button a new (Window1.xaml.cs ) window display.
- Then add following code
private void button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Wellcome to WPFsolution.blogspot.com");
}
- then Execute by using F5 key
Thanks,For Visiting.
If any problem occurred just leave a comment
0 Response to "How develop my first WPF Application.(Easy Step)"
Post a Comment