HomeНаука и техникаRelated VideosMore From: AngelSix

C# WPF UI Tutorials: 01 - The Basics

4083 ratings | 558320 views
Support me at www.patreon.com/angelsix 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 Source code here: https://github.com/angelsix/youtube
Html code for embedding videos on your blog
Text Comments (598)
Lasvando's Channel (6 days ago)
I'm a noob in wpf and specially in mvvm architecture but i think that with your tutorial i will able to learn much, if you have done a course or if you'll do i'll be glad to buy it cause you're a top teacher!
Kung Fu Phil (6 days ago)
Great intro. Thank you!
Jasmin Jas (11 days ago)
i cant understand , after i make x:name its didnt make a new func in c#
Trevor Kobilo (18 days ago)
Thank You! Very easy to follow. Great job.
Terry Wajda (22 days ago)
Markiplier E? Lord Farquaad? Mark Zuckerburg??...#eee
Cao Thành Trung Cao (27 days ago)
Awesome! It extremely help me to understand how to create a UI on the WPF ^_^.
shocky lemi (27 days ago)
Thanks mate, great video. also, I was trying to remove the specific word that gets added to the TxtLength everytime the checkBoxes are checked... I came up with this method: private void CckBoxWeld_Unchecked(object sender, RoutedEventArgs e) { CheckBox a = (CheckBox)sender; Length.Text = Length.Text.Replace(" " + a.Content, ""); } but it doesn't seem to work...
Kyle Garrett (1 month ago)
@38:53 How did you do that???
Kyle Garrett (1 month ago)
@39:21 xD Nevermind
jones tako (1 month ago)
How can I send multiple parameters from Button in WPF? I am able to send single parameter which is value of TextBox properly. Here is the code. <Button Content="Submit" Command="{Binding SubmitCommand}" HorizontalAlignment="Center" Grid.Row="2" Grid.Column="0" > <Button.CommandParameter> <MultiBinding "> <MultiBinding.Bindings> <Binding Path="Text " ElementName="txt_FN"/> <Binding Path="Text" ElementName="txt_LN"/> </MultiBinding.Bindings> </MultiBinding> </Button.CommandParameter> </Button>
James Moose (1 month ago)
Thank you.
pohmakas33 (1 month ago)
thank fuck, a guy who actually speaks clear english... so tired of those indian mofos whose heavy accents ruin everything.. i dont have ANYTHING against indians, just making tutorial videos is something they cant do
Belchuke FUG (1 month ago)
Thank you so much this is so great
nolimitsREAL (1 month ago)
Hello, I have created an interface and now i need to look how to connect to a database, where i need to look, to see how it's done, or a good example ? thank you
Ail'enduril (1 month ago)
so how can I make the UNCHECKING delete the last added text? (.Replace() seems to do the trick)
Dávid Zsebi (1 month ago)
I am glad that people like you exist. Thank you for sharing your knowledge.
Andy lec58 (2 months ago)
Probably the best, most concise video I've seen. Just what I needed. Cheers mate.
Great video! I will be sub'ing and watching all your videos!
Jovito Abio (2 months ago)
Hello AngelSix do you know how to bind a date picker SelectedDateChange event to an Icommand in the view model? If yes, will you please show me how to do it? Thanks!
초저수준 (2 months ago)
I've got the money, thank you.
Henrique Jaqueline (2 months ago)
find all control tutorial of mahapp metro ui here https://www.youtube.com/channel/UC7A93DMVwHJZZAsuYrP1eQg
Frank Luckett (2 months ago)
best tutorial for metro ui https://www.youtube.com/channel/UC7A93DMVwHJZZAsuYrP1eQg
Bissash 10 (2 months ago)
WOW! i Finished this first tutorial and im impresive, i learn more in this video than my last 10 days reading a book and watching Udemy course, thanks for such amazing content <3
Sam Magham (2 months ago)
Who the fuck thumbs down this video?!! SMH Thank you AngelSix!
Osmar Takashi (2 months ago)
Very good,
Bunny Bee (2 months ago)
WOW This is exactly I was looking for .... Thank you so much for this series! I will watch every single video of it! :-)
Balu Subbu (3 months ago)
Sir its really a great tutorial and simple to under stand & a sincere thanks, please throw some more light on a simple project which includes datetimepicker , combobox with search any string functionality , datetimepicker inside datagridview and most importantly (of course its differanct from the subject) how to secure the assembly against the reverse engineer with any tool like ILDSM. thank you
Nested Mango (3 months ago)
Great tuto..Sir...By using C# We can Make 2d and 3d game on Unity game engine. Unity is free.
Jahaziel Mbira (3 months ago)
Best teacher on planet!! I knew csharp WinForms only that I have never done WPF. This is best start ever. Keep up!
Leandro Augusto (4 months ago)
Fantastico!
Ahmed SCHHAIDER (4 months ago)
Hello, Thank you for the tutorial, Just I have a question: Can you give us a tutorial how to manage with reporting in MVVM wpf applications, Best regards,
David Porter (4 months ago)
Good video
Henry Gene (4 months ago)
I'm sorry, but anyone who teaches WPF by "I know all the commands, so I'll just type them in.." is not appropriate for the newbies, that it purports to be. You should not have to know to type in "Stack Panel" or any of the other commands :(
AngelSix (4 months ago)
Come again? So someone who teaching WPF should not know WPF? Or are you saying I shouldn't tell you what a StackPanel is and instead just say type along kids?
ChewieEgg (4 months ago)
Exactly what I needed, how often does that happen? Thank you!
Bertram Stier (4 months ago)
THIS is AMAZING. Thank you! Its clear. Its very informative. I was able to just code along with you. And it works. I've done SO MANY tutorials, and they don't work. And it is so frustrating. You let us know why you do things... Just Great!
AngelSix (4 months ago)
Thanks and glad I could help you out
Lloyd Wilhelm (4 months ago)
I clicked here because I wanted to know what WPF means. So the first thing out of your mouth should be an explanation of WPF. It sadly wasn't. Sorry I am not a geek but I also don't know what UI Is. You got to get more basic not every one is up on the abbreviations used.
Ciccio&Bombo (4 months ago)
Using the last theme... some people just wanna watch the world burn
Jan Reinders (5 months ago)
Clear explanation. Understandable English. Good tempo. Great!
AngelSix (4 months ago)
Thanks
Kazem Javadi (5 months ago)
Thanks. Great! If you record and share some videos in detail for MVVM design pattern and also Entity Framework we will be thankful.
Kazem Javadi (5 months ago)
+AngelSix Good job! Thank you!
AngelSix (5 months ago)
Yes I do that in the future videos of this playlist
Abel Paim Paim (5 months ago)
Can you make classroom slides available?
AngelSix (5 months ago)
I don't have any
Abel Paim Paim (5 months ago)
Muito bom
AngelSix (5 months ago)
obrigado
Richard Lee Parkin (5 months ago)
Is it better to use a framework like MVVM light to setup, even if you dont fully understand it. Or just go at it from scratch like your doing here?
AngelSix (5 months ago)
An MVVM framework isn't needed in WPF, its basically by design in the framework itself really. I'm just defining the classes and consuming things in a way that makes it MVVM. Because the Views in WPF inherently support binding to view models (INotifyPropertyChanged) thats the built in support I am on about. Howevewr, when you get to cross platform code sharing, you will need a library. I've made my own for that, which we will get to eventually. So if you plan to share the code with mobile apps, use a framework, otherwise just DIY
Max Almonte (6 months ago)
Wow! I can't believe how easy you make things look, you're the best!
AngelSix (5 months ago)
Thanks :)
Casper Knudsen (6 months ago)
Who watched this and did not like it? Wtf LOL. GJ and TY for the tips.
AngelSix (5 months ago)
Your welcome :) Glad you liked it
M'madi Zaib (6 months ago)
Merci pour cette belle introduction au WPF.
AngelSix (5 months ago)
merci
Very detailed and useful tutorials, Thanks.
AngelSix (5 months ago)
Your welcome
Powder (6 months ago)
why should i use wpf when i can do the same shit in winforms in 1 minute? i dont get why people love wpf. still great tutorial ty
AngelSix (5 months ago)
It's because you have far more control over scaling, UI design customization and its hardware accelerated graphics. Very powerful and much much easier to style stuff in WPF than WinForms
Derstine Buyagan (6 months ago)
Why aren't you using the black theme in Visual Studio?
AngelSix (6 months ago)
I do in future videos
AiguretDuren (6 months ago)
Thank you for the great video.
AngelSix (6 months ago)
Your welcome
פניאל דהרי (6 months ago)
I just exposed to this channel man you are the thing thanks a lot !
AngelSix (6 months ago)
Glad you like the vid, and welcome :)
Eric Sebastian (6 months ago)
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!
AngelSix (6 months ago)
Glad I could help. Yeah I think once you think of the layout in a different way, its very easy to construct anything you can imagine
Belike Water (7 months ago)
AngelSix you are the man! I am subscribed. Wish I would have found you a year ago!
AngelSix (7 months ago)
Awesome, thanks for the sub
Munkh-Erdene Nasan (7 months ago)
why are you event typing "this.", event when visual studio says you don't need to type? i'm sorry. this kind of things make me loose my mind
AngelSix (7 months ago)
Haha don't worry I changed my preference later on. I've always used this. as it clearly signifies in code that the object in question belongs to the class we are in. However, I prefered to remove it in future
James Santiago (7 months ago)
Beautifully presented video!!
AngelSix (7 months ago)
Thanks
Vinay Palaksha (7 months ago)
I understand WPF uses Dependency properties vastly.How much important it is to know how to implement our own custom Dependency properties in a typical WPF application? Can you please suggest a use case where we may need to implement a custom Dependency property. Thank you
Vinay Palaksha (7 months ago)
Awaiting for it. Thank you
AngelSix (7 months ago)
My later videos show how to.
Michael Titmas (7 months ago)
I've finished your tutorial 1 and followed through with the code. It has taken away the fear of WPF; thank you. The buttons etc all resized horizontally as they should but how can you resize them vertically as well. Another query; how can you make the text resize in proportion to the control's resizing?
Michael Titmas (7 months ago)
Thank you for your help.
AngelSix (7 months ago)
Glad I could help. For sizing, you would typically not "size" the button directly, but let it size to its content. Then change the font size to "grow" the button. Add padding to the button to space it away from the font
khaled alkiki (7 months ago)
i have a question, my aim at the end is to create a graphical user interface which shows the readings of many sensors connected to arduino. does this course cover similar idea and make me able to achieve it. its for a thesis project. any help from anyone would be appreciated thanks a lot
AngelSix (7 months ago)
Yes you can it covers a lot of similar things
DOTA 2 Replays (7 months ago)
Thank you so much... im a newbee and I am Learning a LOT, THANK YOU! THANK YOU!
AngelSix (7 months ago)
Your welcome
Vinay Palaksha (7 months ago)
Hello Sir, wound you please tell me How can I achieve Auto suggest kind of functionality in Combobox. I tried IsEditable=true, Readonly=false. If I type 'Jo' in combobox drop down, list of names containing Jo like Joe Rege, Regan Joe, Jordan have to appear from list of bound data. Thanks much.
Vinay Palaksha (7 months ago)
That would be great. Thanks much
AngelSix (7 months ago)
I will do a future video on it. It's not easy to just explain in a comment
gabriel torres (7 months ago)
By the way, good video really helped a lot to understand this part of wpf with c #, highly recommended
AngelSix (7 months ago)
Thanks
gabriel torres (7 months ago)
In the min 50:23 to the 52:00 I do not get what would be the executable function of starting note where it appears automatically, this is what should be and that I check the code as 4 times and I do not achieve it, I get zero or something like that and the program conflicts with the this.notetext = text (string) value.content;
AngelSix (7 months ago)
When the WPF window is loaded (so it renders to the screen) we manually fire the dropdown changed event, which then sets teh text to the currently selected item.
gabriel torres (7 months ago)
I do not get the function of the part in which it appears in the Textbox of note automatically when executing the program (the "no painted" in the "Note textbox")
AngelSix (7 months ago)
I don't understand the question sorry
Darren Stott (8 months ago)
If you wanted to be slightly more efficient in coding the clearing of all check boxes (or other controls) it would be better to use a loop: private void ResetButton_Click(object sender, RoutedEventArgs e) { foreach (Control ctl in chkPanel.Children) { if (ctl.GetType() == typeof(CheckBox)) ((CheckBox)ctl).IsChecked = false; }
AngelSix (8 months ago)
Sure. You could also do if (ctl is CheckBox checkbox) { checkbox.IsChecked = false; }
Darren Stott (8 months ago)
After years of coding WinForms this really is a breath of fresh air. It's nice to see a YouTube video where the author knows exactly what they're talking about!
AngelSix (8 months ago)
Thanks. Glad I can be helpful :)
Simon Voggeneder (8 months ago)
Incredible tutorial. Although you plunge right into the topic I never felt left out, as you explained everything on the go with great clarity and speed. It's a rare sight to behold.
AngelSix (8 months ago)
Thanks, glad you like it :)
Lollipoppeii (8 months ago)
hey...... thank you
AngelSix (8 months ago)
Your welcome
High Lord Ozairu (8 months ago)
This is ridiculously precise. I prefer to do it by hand. Typing all that out seems inefficient.
AngelSix (8 months ago)
No problem
High Lord Ozairu (8 months ago)
After watching more tutorials on WPF I’m realizing you’re not supposed to drop it in by hand. It’s going to be steep learning curve coming from WinForms. Thanks for making these great tutorials!
AngelSix (8 months ago)
It's tempting to do UI by hand, but trust me once you get used to coding it, its both far more accurate, powerful and beneficial. I can make UI faster in code than drag-dropping. Drop-dropping doesn't and cannot represent the intention of UI to respond to different screen sizes, orientations, scaling etc.. that code can
Pavel Kuska (8 months ago)
Great stuff about C#!
AngelSix (8 months ago)
Glad its useful
Game Over (8 months ago)
pourquoi un titre accrocheur en français pour finalement du contenu en anglais ?! c'est vraiment putaclic!
AngelSix (8 months ago)
La communauté traduit les titres pour moi et ils n'ont pas traduit le contenu.
Yossi Rienitz (8 months ago)
Great content!! I was wondering if this would be helpful for building xamarin app as well, is it the same concepts?
AngelSix (8 months ago)
Not exactly, but similar-ish. We will learn Xamarin UI soon
Skywirefan (8 months ago)
In MainWindow.xaml I cannot have more than one button, I'm in the xaml tab instead of the design tab and any time I make another button, it says "The property "content" is set more than once"
AngelSix (8 months ago)
Cool glad you solved it
Skywirefan (8 months ago)
+AngelSix i fixed it, i was doing it on the base window instead of placing down a grid
AngelSix (8 months ago)
Inside what element?
Vinay Palaksha (8 months ago)
Hello Can you please tell me what's the difference between x:Name and Name while declaring controls. I tried both and could not find any difference. I can still access Name given in code behind irrespective of either of them?
AngelSix (8 months ago)
Legacy namespace support when XAML didn't understand Name for the backend auto generated code. Now it does we are safe to not use it really
Trzbne (8 months ago)
Thank you very much for the tutorial. You handle perfectly, where to zoom, what to show and how, with perfect timing. Wow, that trick with Alt + selecting - I really thought that you need ReSharper for that :-) Jump to the code behind file from .xaml: F7.
AngelSix (8 months ago)
Glad you like it :)
Diogo Silva (9 months ago)
Great tutorial! Thank you!
AngelSix (9 months ago)
Your welcome
mohamed anakiou (9 months ago)
hello sir thanks for this useful tutorial please give us something new and beautiful design
AngelSix (9 months ago)
Sure I will do more UI designs in future
mohamed anakiou (9 months ago)
are you microsoft programmer ??
AngelSix (9 months ago)
As in work for microsoft? No.
Maneesh Reddy Mallu (9 months ago)
How to remove an item in LengthText when we uncheck them?
Martin Balage (9 months ago)
Thank you. [edit after 30mins] This is so good :)
AngelSix (9 months ago)
Your welcome
Chris Anderson (9 months ago)
This series looks promising, thx for making this! Settling in for a tutorial binge :D
AngelSix (9 months ago)
Ha awesome, hope you enjoy
Govind Saini (10 months ago)
is it possiable to work with identity freamwork in wpf viewmodels
AngelSix (10 months ago)
Identity is specifically for websites, cookie style authentcation and generally web-based user systems. No point in it for WPF
Veso266 (10 months ago)
you think you could try making something like this: https://www.google.com/search?client=firefox-b&biw=1472&bih=702&tbm=isch&sa=1&ei=KwJOW66sD8f4wAKAm4G4Aw&q=BMW+iDrive+FM+Radio+station&oq=BMW+iDrive+FM+Radio+station&gs_l=img.3...204839.206002.0.206259.8.8.0.0.0.0.136.740.5j3.8.0....0...1c.1.64.img..0.0.0....0.TlxWaEsOZj0#imgrc=amL6YgBQVFbFBM:
Veso266 (10 months ago)
+AngelSix Thanks will wait and Subscribe :)
AngelSix (10 months ago)
Sure we could do that if I get time
Dev Eagle (10 months ago)
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!
AngelSix (10 months ago)
Thanks glad you like it :)
Erik Westerveld (10 months ago)
I find it very hard to follow along at this pace. It would be nice if there was slow version of these tutorials for us slow people. Other than that great content.
AngelSix (10 months ago)
Thanks. I thought I was going slow. When I come to do a true beginners series (as this one is actually an intermediate course as it progresses) I will make the beginners slower
Matt R (10 months ago)
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!
AngelSix (10 months ago)
Glad I could help
Elba Toro (10 months ago)
T5
Sandi 87 (10 months ago)
Uuhc7cara x,zc zoo Yunus xz
AngelSix (10 months ago)
345efdgdfn 565hg f gjk;[email protected]
Dani goldfarv (10 months ago)
Can someone explain to me why I shouldn't just drag and drop everything into a grid? This is a legit question
Dani goldfarv (10 months ago)
Woah you actually replied! Thanks! This is a great tutorial and I used it for my final project.
AngelSix (10 months ago)
You can if you want, but the UI isn't just a single size and shape as it shows on screen. You cannot define your constraints, what you expect to happen when something expands or contracts, you cannot accurately set margins/paddings to the same, and so on
Timothy Joseph (10 months ago)
before i jump into this, what should i learn first? i already started learning stuff, i just want to make sure i am up to par before jumping in. i am a beginner and i'd love to be able to create simple and advanced desktop apps.
Timothy Joseph (10 months ago)
thanks
AngelSix (10 months ago)
I would view my C# videos and General Programming first. This series is more of an intermediate level. I plan on a full beginners WPF series after this one
Priyanka Rani (10 months ago)
Can you please make some videos on implementations of real time graph using wpf
AngelSix (10 months ago)
Right now I have no use or need for graphs in this application but eventually yes I will as many have requested it
chetan pai (10 months ago)
What font family ur using.?? Looks great. !!.
AngelSix (10 months ago)
Quicksand... I think. Check the source github.com/angelsix/fasetto-word in the Fonts folder in Fasetto.Word
ameyer117 (10 months ago)
Awesome tutorial. Very clear.
AngelSix (10 months ago)
Thanks and your welcome
TechnikWissen24 (11 months ago)
Thank you for this tutorial!
AngelSix (11 months ago)
Your welcome
Kevin Arévalo Fernández (11 months ago)
Many thanks! Clear and simple explanation.
AngelSix (11 months ago)
Your welcome glad it was useful
Jason Harvey (11 months ago)
The second stack panel to hold the buttons! you can set margins to space them equally across the panel.
qu mu (11 months ago)
HOw did you duplicate lines so quickly?
AngelSix (11 months ago)
If you have no text selected on that line, pressing Ctrl + C copies the entire line. Then pressing Ctrl + V pastes it in
MK_Freestyle (11 months ago)
private void Uncheck(StackPanel sp) { foreach (var i in sp.Children) { if (i is CheckBox cb) cb.IsChecked = false; } }
J.A. Campbell (11 months ago)
Good clear introduction to WPF and XAML (and why typing code is better than dragging and dropping!)
AngelSix (11 months ago)
Thanks
Cassiopeia (1 year ago)
I like this. So straight forward. Doesn't treat the viewer like a baby as in other tutorials.
AngelSix (1 year ago)
Thanks. Glad you like it :)
JoshuaWashua (1 year ago)
Dude you go WAY too fast.
AngelSix (1 year ago)
Ha sorry. I guess you can at least pause the video that will help a little
Yongpeng Zhu (1 year ago)
Thank you very much Angelsix. How do I get the code? Or can you tell me your email?
Yongpeng Zhu (1 year ago)
Thank you
AngelSix (1 year ago)
https://github.com/angelsix/youtube/tree/develop/WPF
szopad (1 year ago)
such a great toutorial series, it helps so much funny thing is, I went to read about you on your website, where I read "if something seems too good to be true it most probably isn't" this is what I think about your vids :D they are just too good, thanks man
AngelSix (1 year ago)
Thanks and I'm glad I can help
MagoArcade (1 year ago)
This is good work - thanks
AngelSix (1 year ago)
Thanks I'm glad you like it

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.