|
C# WPF Introductory Example
|
|
04-04-2010, 09:50 AM
(This post was last modified: 04-04-2010 09:50 AM by Back_track.)
Post: #1
|
|||
|
|||
|
C# WPF Introductory Example
WPF APPLICATION - EXAMPLE
1) Create the application by - Opening Visual Studio 2008 ( Or Express 2008(C#)) 2) Choose WPF Application 3) It should bring you to a screen as such ![]() The XAML Code should look like: Code: <Window x:Class="WpfApplication1.Window1"Now to use the GUI designer click on the tool box ![]() Add a button to the form, the code should be modified as such: Code: <Window x:Class="WpfApplication1.Window1"Code: <Button Height="23" Margin="94,0,109,12" Name="button1" VerticalAlignment="Bottom">Button</Button>Code: <Button Height = "23"Code: Margin="94,0,109,12" // This is giving the margins of the buttons if i'm correct it is each value of the square(Button)Code: Name="button1"Code: VerticalAlignment="Bottom">Button</Button>Now lets change the Buttons 'Content' Text basically On the XAML Code under the button's code change the content to Anything Ill change it to Pro9ramming for now Now in the tool box add a label , once you added it change the content to null(Blank) Now, on the button we made double click ,and it should bring you to something you're more familiar with C# code now type in the following, Code: private void button1_Click(object sender, RoutedEventArgs e)Now you have a basic introduction to WPF programming , i'll be uploading a book or two later I hope someone gained something off this tutorial, feel free to add your own suggestions and leave criticisms. "Character is determined more by the lack of certain experiences than by those one has had." Friedrich Nietzsche |
|||
|
04-04-2010, 10:08 AM
Post: #2
|
|||
|
|||
|
RE: C# WPF Introductory Example
Very nice example indeed! I am not a fan of WPF but you have done a great job here!
|
|||
|
04-04-2010, 11:49 AM
Post: #3
|
|||
|
|||
|
RE: C# WPF Introductory Example
Heh, neither am I. It's a weird coding style, but I thought I'd atleast give it a try.
"Character is determined more by the lack of certain experiences than by those one has had." Friedrich Nietzsche |
|||
|
04-04-2010, 06:08 PM
Post: #4
|
|||
|
|||
|
RE: C# WPF Introductory Example
Exactly right, it may come in handy some time
|
|||
|
04-04-2010, 09:51 PM
Post: #5
|
|||
|
|||
|
RE: C# WPF Introductory Example
Very good code i can say.
Especially the part with this sentence : "P9 Is Rising the Ranks!" There's a fine line between genius and insanity. I have erased this line. Oscar Levant There's a fine line between an administrator and black hat hacker. I have erased this line. Dr DEBCOL |
|||
|
« Next Oldest | Next Newest »
|



![[Image: 50861_capture.jpg]](http://myph.us//pics/50861_capture.jpg)
![[Image: 50862_capture.jpg]](http://myph.us//pics/50862_capture.jpg)



![[Image: pgsig copy.png]](http://projectghostt.com/images/pgsig copy.png)