Advertise with us
Control Panel
Forum
Hosting Help
ASP.NET 4.5 & SQL 2012 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
Home
»
Resources
»
A simple window application for WPF beginners in Asp/C#.net 3.5
ASP.NET
ADO.NET
Web Services
Remoting
Visual Studio 2005
Error Bank
Interview Questions
Tips & Tricks
XML
HTML
Jscript/Javascript
IIS
Windows
General
Submit Resource or code snippet
... and get
surprise gifts
Win Digital camera, ASP.NET Books, Free softwares!!
A simple window application for WPF beginners in Asp/C#.net 3.5
30 Apr, 2010
Author:
shweta
none/SGRRITS
Summary
This simple window based program is describing basics of developng a WPF Window application ,first window having 5 button and second reverting back to first.
.NET Classes used :
System.Collections.Generic;
System.Linq;
System.Text;
System.Windows;
System.Windows.Controls;
System.Windows.Data;
System.Windows.Documents;
System.Windows.Input;
System.Windows.Media;
System.Windows.Media.Imaging;
System.Windows.Navigation;
using System.Windows.Shapes;
x:Class=WPFWin.Window1
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
Title=Window1 Height=300 Width=300>
<Grid>
<Button Height=23 Width=100 Margin=115,40,53,0 Name=button1 VerticalAlignment=Top Click=ChangeLocation_click7gtChangeLocation</Button<
<Button Height=23 Width=100 Margin=115,81,53,0 Name=button2 VerticalAlignment=Top Click=AutoFit_click7gt AutoFit </Button>
...
</Grid>
In desiging place Button 's code in b/w grids in window.xaml
while the event generation code in window.xaml.cs
like
public Window1()
{
InitializeComponent();
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
this.WindowState = WindowState.Maximized;
}
private void ChangeLocation_click(object sender, RoutedEventArgs e)
{
this.WindowState = WindowState.Normal;
this.Top = 300;
this.Left = 300;
}
...
}
Feedbacks about this page from members:
- No Feedbacks yet !! -
Submit Feedback
View All Feedbacks
Total
members
:
250637
Average new registrations per day (in last 7 days):
7
New Registration:
Open
Register Now
Talk to Webmaster
Tony John
Facebook
Google+
Twitter
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.