C# WPF UI Tutorials: 01 - The Basics

preview_player
Показать описание


The first in a series of tutorials on creating WPF applications in C#

Starts with creating and using some basic controls like text boxes, labels, buttons, checkboxes and drop downs

Рекомендации по теме
Комментарии
Автор

This video is far more than basics. This video gives you a solid foundation to start building WPF the right way. I am so glad you explain every little button press and detail of what you're doing as it made this refreshingly easy to follow. I felt lost trying to layout my new app. But now, I just put everything in grids and stack panels and it's beautiful lol. Such great advice!

dizzykwalla
Автор

This is by far the best WPF tutorial out there.

It has the perfect pace for advanced beginners. Huge plus is that best coding practices are applied thoroughly (naming stuff, writing good comments in paralell with the coding, constant refactoring, organizing the project ... everything about the tutorial is just superb). The explanations are clear and you are treating your audience as adults without going into either too basic stuff or into too much details. At the same time the examples are very far from typical toy tutorial projects and can be applied in day-to-day work immediately (personal experience).

You truly have managed to create a masterpiece, thank you very much!

CsabaVargaZoltan
Автор

46:07
In case anyone is wondering, the event name is "Click". This will trigger when the checkbox is checked or unchecked. It also triggers whether you use a mouse or the keyboard.

ragtop
Автор

Great video, thank you. As a WinForms developer trying to learn WPF, this is by far the best video I've seen on the topic. This video shows what to do and how to do it and doesn't dump a whole bunch of theory on the user. Nothing's more confusing than watching a WPF video and hearing someone drone on about "best practices" in WPF when you don't even know how to write XAML!


Thanks again

patricktucci
Автор

Excellent tutorial! Thank you for making this. This is the best WPF application I've seen on YouTube. Looking forward to part 2. Also looking forward to more WPF / C# applications!

deveagle
Автор

Thank you for putting together this series. Best intro to WPF out there by far from my perspective. Good content and pacing and everything is clearly explained like the null reference exception toward the end. Was good that that happened as people new to this could be stymied by stuff like that when they go to build their first application.

brianfrancis
Автор

I really love how you taught in this video. I really understood the basics compared to other videos here in YT and other materials!! This is really helpful! Thanks a bunch!

babymatoki
Автор

At last.. someone who is thorough, concise and can speak english...

johnpelitidis
Автор

If you want to keep the buttons the same size with spacing you can set the right margin to 6 for the left button, a left margin of 6 for the right button and a margin of 3 on both the left and right of the middle button. All three buttons will have then have the same size and the total margin spacing will be 9.

NoodleFlame
Автор

I am glad that people like you exist. Thank you for sharing your knowledge.

blackky
Автор

This is by far the best WPF tutorial I've ever watched. Thank you SO MUCH!

RugbugRedfern
Автор

fantastic explanations again. I hope you cover database and MVVM in the future. thank you for these great vids.

GonzoGonschi
Автор

00:00 - Part I: Building The interface
28:37 - (Quick review of the code)
35:17 - Part II: Coding the buttons (adding events to the buttons)
35:17 *event - Click* Apply-button
38:29 *event - Click* Reset-button
41:55 *event - Checked*
46:12 *event - SelectionChanged*
52:17 *event - TextChanged*

for myself:
I
26:00 *SelectedIndex="0"* <-- 1st item of dropdownlist is forced into menu
"Content" => Buttons & Checkboxes
"Text" => everything else

II
<ComboBox x:Name="FinishDropdown"

35:17 *event - Click*
Apply-Button Interaction:
"When Apply-button is clicked => whatever is written in (textbox Description), should be shown via a MessageBox.Show"
1) In MAINWINDOW.XAML (Button Apply) add: x:Name="ApplyButton"
2) In MAINWINDOW.XAML (Button Apply) add: Click="ApplyButton_Click"
3) In MAINWINDOW.XAML (TextBox Description) add: x:Name="DescriptionText"
4) In MAINWINDOW.XAML.CS (Apply_Button_Click-method) add: MessageBox.Show($"In the discription it says:

38:29 *event - Click*
Reset-Button:
"When Reset-button is clicked, uncheck all checkboxes"
1. In MAINWINDOW.XAML (Button Apply) add: x:Name="ResetButton"
2. In MAINWINDOW.XAML (Button Apply) add: Click="ResetButton_Click"
3. In MAINWINDOW.XAML (for each checkbox) add: x:Name="xxx"
4. In MAINWINDOW.XAML.CS (Reset_Button_Click-method) add:this.xxx.IsChecked, this.xxxx.IsChecked = false

41:55 *event - Checked*
"When a checkbox is checked, add the content to a textbox (Lenght/LengthText)"
1.  In MAINWINDOW.XAML (TextBox) add: x:Name="LengthText"
2.  In MAINWINDOW.XAML (for each checkbox) add: Checked=”Checkbox_checked”
3.  In MAINWINDOW.XAML.CS (Checkbox_Checked-method)add: this.LengthText.Text += ((Checkbox).sender).Content

46:12 *event - SelectionChanged*
"Select an item from combobox (Finish) => add it to TextBox (Note)"
1.  In MAINWINDOW.XAML (TextBox) add: x:Name="NoteText"
2.  In MAINWINDOW.XAML (ComboBox) add:x:Name=”FinishDropdown”
3.  In MAINWINDOW.XAML (ComboBox) add:
4. In MAINWINDOW.XAML.CS add:
if (this.NoteText == null)
return;
this.NoteText.Text = (string)

*EXTRA*
To have, from the startup, the standard-option allready filled in the textbox:
1.  In MAINWINDOW.XAML (within <window>) add:Loaded=”Window Loaded”
2.  In MAINWINDOW.XAML.CS private void Window_Loaded(object sender, RoutedEventArg e) { FinishDropdown_SelectionChanged(this.FinishDropdown, null); }

52:17 *event - TextChanged*
" When you type in a supplier name in (TextBox SuplierName), put it in (readonly TextBox Mass)"
1.  In MAINWINDOW.XAML (TextBox) add: x:Name="SuplierNameText"
2.  In MAINWINDOW.XAML (TextBox) add:
3.  In MAINWINDOW.XAML (TextBox Mass ) add: x:Name="MassText"
4.  In MAINWINDOW.XAML.CS add: this.MassText.Text = this.SuplierNameText.Text;

tomdewilde
Автор

I have been looking for something like this for some time now ... creating an application from scratch... You've done a wonderful job. I loved it. Thanks a ton for doing this. I can't wait to go through the rest of your videos.

Hollerbiju
Автор

This is exactly what I was looking for as a WinForms dev getting into WPF. Thank you for the time and effort to compile this series. I'm excited to watch the rest of the videos!

mattr
Автор

I watched a lot of tuts and I have experience on WPF but not no one teaches like you really good work and keep uploading videos there are a lot of people who are hungry for learning.

AhmedHussainy
Автор

This is a complete and not boring starter video. Thanks a lot. I'll be watching most episodes to learn c#!!

DRocksRecords
Автор

This is the BEST WPF TUTORIAL ever. Thank you so much as I am coming from Java.

thndrkeepevolving
Автор

This channel is like netflix for me! enjoying!!

fernandofsan
Автор

Thanks a lot, great tutorial !!! the best videos to learn wpf !!!!

marcol