Hey guys, wanted to clarify something: Many videos I make are designed around a general approach. Rather than dive into the nitty-gritty, my goal is to give you the basic gestalt of the concept. Normally I do NOT: 1) Use events (See my command videos) 2) Instantiate new view models every button click (See my notepad/contact book series) I usually have separate videos for the concepts that I do have to cut corners on since some concepts have prerequisite knowledge of others. My content is intended to guide people in a better general direction, and should not be interpreted as "The Answer" based on 1 video (As this would be relatively hard to compress into a 20 minute video). If you want to see all the concepts tied together for better understanding you may want to check out some of my video series, such as the ContactBook or Notepad series. Thanks!
@sandrinaribeiro7978
3 жыл бұрын
Thank you. I've been learning wpf with you.
@lazolabucwa8821
2 жыл бұрын
I think your general approach to these design tutorials is the best for learning. Thank you so much for taking the time to make them.
@RonanRTW
2 жыл бұрын
Any new programmer who thinks its best to learn everything at once.... is smarter than me. Thank you for breaking it down.
@XPWHACTL
4 жыл бұрын
I learned more from this video than hours of trawling through Google. Straight to the point. Great content.
@billreed2423
5 жыл бұрын
I'm older and have plenty of C skills from decades ago but have been trying to learn C#, WPF, XAML. I've been designing an application for my wife that talks to a DB using C# to learn by as that is the only way I learn, by building a real app. I became stuck trying to more-less figure out how to do exactly what you covered here in 20 mins. Thanks a million. Spot on. You were first page for my Google search, so good SEO for you.
@musengechilumbu
5 жыл бұрын
I have searched the entire youtube for this tutorial, finally someone who has done it the i expected
@user-zo6wk8km6i
4 жыл бұрын
Oh my god, just thank you. You did more for me in 19 minutes than lecturer in my university in 2 classes
@ToastyB9
2 жыл бұрын
I too had been searching google and watching videos trying to piece this together. This is perfect. I am new to WPF but have over 25 years experience in software development. Thank you.
@nivien7220
2 жыл бұрын
This saved me yesterday from breaking my keyboard because my university course didn't explain MVVM enough. Thank you.
@JamesSchram102045
7 жыл бұрын
I have found your videos quite helpful, where others try to teach me everything at one time yours seem to focus on one aspect at a time. This makes it easier for me while trying to use it in an application I am working on. Thanks I hope you do more I think I understand how each view is accessed I would like to know more about how to move all my business rules into the Models folder.
@ToskersCorner
7 жыл бұрын
Thank you, James. I try to make my content "modular" in a way so that a viewer can easily configure and watch content according to their needs. This way they do not get distracted by things they are not ready for, nor get distracted by things they already understand. I definitely plan on doing many more, but it is getting near the end of the semester for school, so I have been quite busy lately. Always feel free to email me suggestions or questions at: toskerscorner@outlook.com
@kevinmungame1869
3 жыл бұрын
The best tutorial for MVVM
@vorgeschichte713
Жыл бұрын
Great tutorials. I can take a lot more from this than reading articles that often just skip setup etc.
@67Keldar
3 жыл бұрын
Your videos are really good… shouldn’t put yourself down…. I’m finding them very helpful
@user-hs6jy8gm7v
Ай бұрын
Did a great job on the video. It's still very applicable today. Thank you for taking the time.
@n.a3182
2 жыл бұрын
This was probably the best tutorial I have ever seen. Thank you!
@crowther1963
3 жыл бұрын
These videos are spot on. The right amount of content, extremely well delivered. I've looked at many online tutorials - these are the best I have discovered.
@MahmoudSaadawy
Ай бұрын
I hope u come back soon. Ur content is gold! ❤
@r1johnny
3 жыл бұрын
Excellent vid. Just clicked on your channel and found nirvana! Looks like I'm going to be busy for a while watching your vids. Thx!
@alexandredicarlo3940
7 жыл бұрын
Good tutorial for me, I'm starting to learn WPF+ MVVM and this help me a lot ! Thanks you
@ToskersCorner
7 жыл бұрын
Thanks, man! Hope my content continues to help!
@leomardo2285
2 жыл бұрын
I like this extreme coding style of learning. It goes deep and your explanations were great! good job. Although thats not what I came here for but I learned something I did not know so PLUS Experience.
@rey.demand1737
4 жыл бұрын
Thanks, this saves my ass at the deadline
@johncross116
9 ай бұрын
Excellent stuff! Thank you Toskers!👍
@werne123125555
3 жыл бұрын
Thank you Sir! Much appreciated. Struggled a lot with this topic. Very clearly explained.
@waltergrimm7161
2 жыл бұрын
Thanx for the great sample, I am looking to extend this, the question and task I have is to create multiple instances with code behind of the same view, and use the Obj instance to work dynamically with the instances (eg like the tabs in VS, all have same window, but the instances will save to different files, show different code and behave different, but using one and the same XAML page with code)
@ccarcerano
2 жыл бұрын
Excellent tutorial. Good job!
@marshalstewart7776
2 жыл бұрын
Very good video, made views make way more sense.
@antjebreitenstein9846
5 жыл бұрын
It is a really helpful tutorial. Your short and focused explanation is great to understand. Edit: I added another view and wanted it to be the default view, but it doesn't work. Could you explain how to set a view as default?
@CanadianMang
2 жыл бұрын
As much as I want to learn WPF, I feel like its a losing battle trying to learn it. It is just so complex and I can't seem to find and resources that teach you from the ground up. Watching random videos here and there and reading forum posts just aren't cutting it.
@Dan251299
6 жыл бұрын
You are a genius, finally an actual useful tutorial
@chrissv7217
5 жыл бұрын
Hello ToskersCorner, I love your tutorial, but unfortunately I am very bad in English and especially the audio, so I may be missing an information so me question. Is there a need to close the old views? For example when you switch from red to blue, red is always loaded? where it has been automatically closed. I ask you this because, my views contain information that it will look for on a system (PLC) by an RS232 communication. Each view will look for different information. If a page that has been opened remains open when you change your view, it will continue to search for data on the RS232 and overload the communication. I hope you understand what I'm trying to say to you, sorry for my english. Thanks for your feedback.
@rexbrown2752
7 жыл бұрын
Great Video! Not exactly what I needed but some good information. I will be looking for more of your tutorials as you seem to do a great job of explaining things.
@Malcrom1967
Жыл бұрын
Your video was great help but it is more creating new views rather than switching between them. I'm part way there anyway :)
@apoloramirezfalcon
7 жыл бұрын
Extremely useful tutorial. Thank you man.
@AntonioCorneal
3 жыл бұрын
Dude this was super helpful, and super simple to follow. Exactly what I was trying to find haha. Thanks!
@christopherbaldwin1194
4 жыл бұрын
Thank you so much lol. I've been trying to achieve this but couldn't figure out what it was called. I was trying with tabcontrol. Very much appreciated now I'll fix all my coding
@carlzacharia4222
6 жыл бұрын
One of the best done videos I've ever seen! Thank you!
@elchino7672
4 жыл бұрын
Many thanks, man. Very good explanations. Good job
@maxijoker1
4 жыл бұрын
Oh, this is a nice video tutorial. Thank you very much. This is exactly what I was looking for. Just out of curiosity, do you think this would work with anything other than a user control? Say, like a Page or something like that?
@stephenraubenheimer5665
3 жыл бұрын
thank you for this tutorial it worked and I am so happy
@StarLakeFarm
3 жыл бұрын
Great video. Is there a follow up video showing how to pass data from parent to child and vice versa using MVVM?
@haohuynhnhat5292
4 жыл бұрын
Thank you very much, that i need. You're save my life...
@Farrukhw
6 жыл бұрын
Thank you very much... Its really quite helpful...
@4kaSOSiso
2 жыл бұрын
Great tutorial. Thank you.
@alwaysinagoodshape5327
4 жыл бұрын
You are a hero. This helped me a lot.
@papamoneyph
7 жыл бұрын
Thanks for the video, simple and easy to follow!
@ToskersCorner
7 жыл бұрын
Awesome to hear!
@MartinPark-rn9hn
Жыл бұрын
very helpful thank you!! I have a question about this, if i have a button in my red View and i want to change from there so the green view, is there a way to do it? or can i remove the data context from the red view ? Thanks a lot for your nice tutorial!
@emlovyingaming2130
7 жыл бұрын
A tip: turn up the volume when you edit next time :)
@ToskersCorner
7 жыл бұрын
Yeah, I am aware of this now. Thanks.
@noclicheplease
7 жыл бұрын
Just what I needed. Thanks. Keep up the good work.
@PhilipObubuafo
6 жыл бұрын
This is a very unique tutorial and a useful one too. Thank you Tosker @ToskersCorner
@135789vipul
3 жыл бұрын
Just the thing I needed..Thank You So Much!!!!!
@umutcoskun4247
3 жыл бұрын
This was a great tutorial. Thank you
@bobhughes2178
4 жыл бұрын
Very helpful. Thanks
@mr.paanaa3765
3 жыл бұрын
helpful video. thanks sir
@artyoml7408
7 жыл бұрын
thank you, man
@ToskersCorner
7 жыл бұрын
No problem. I hope it was useful :)
@n.a3182
2 жыл бұрын
Great Video! Is there a way to pass parameters to the usercontroll when you click a button?
@sanketkhamkar
3 жыл бұрын
Best solution
@Ppkportalcom
3 жыл бұрын
Iam new to wpf coding. One question I have. what happen to preview view when new view is called. is it still running in background?
@meowmix5402
2 жыл бұрын
What do I do If I want to go to another page from a button I have created from doing this?
@mehrajlatifli
3 жыл бұрын
Thank you very much for your help
@ragtop63
4 жыл бұрын
Interesting. Why did you decide to split the grid up into a bunch of small cells? This sort of reminds me of Bootstrap's approach to responsive mobile UI development. Is that the goal?
@danchristianfebra8658
3 жыл бұрын
Just wanna ask how you can pass a data to the desired view? e.g. A JSON string from a successful login from an web api?
@marktruskowski4653
2 жыл бұрын
I tried this twice and every time I get to the part "where I sometimes run into this problem and have to rebuild the solution" I click on rebuild and now my .exe file is missing and I have to start over.
@johncross116
9 ай бұрын
I found a similar way to do this and was wondering if there are pros or cons to this approach? I am new to wpf / xaml so am not sure. loginWindow.Visibility = Visibility.Visible; toolWindow1.Visibility = Visibility.Collapsed; toolWindow2.Visibility = Visibility.Collapsed;
@zacharymeyer991
5 жыл бұрын
Excellent video, thank you!
@Maxmarcos84
3 жыл бұрын
Excellent!!
@raptus859
7 жыл бұрын
is it possible to change the view with a butten from ur current view(e.g from blue to red with a button in the red view ) without using the buttons on the menu bar?
@ToskersCorner
7 жыл бұрын
Glad you asked. Until I am able to do a video on it, I made a post on my website to address your question. I also provided an example project on GitHub to show you how this is done. Link is in the description. :)
@raptus859
7 жыл бұрын
thx
@ToskersCorner
7 жыл бұрын
The "BaseViewModel" is a base for all viewmodels EXCEPT the main. we bind our current view to. So when we bind our view to the "ViewModel" property in our MainViewModel, we can change the property(To a Red/Blue View Model) to change the view. Since Red/BlueViewModels are derived from BaseViewModel we are able to assign them to that property.
@AliHassan-ji5wv
3 жыл бұрын
Finally Thanks dude... 🔥
@JulioCesar-hh9wq
3 жыл бұрын
Okay man, thanks a lot!
@nicolai19971
5 жыл бұрын
thx guy. the best i´d ever seen
@noreply_a80preorder55
4 жыл бұрын
nice tutorial
@uwejadick4550
Жыл бұрын
Thank you, it really helps. How would you work with maybe a 100 different views? I think it will get a bit messy if you have to hard code all views you may have in a very large application.
@AiguretDuren
5 жыл бұрын
Thanks for this, Tosker
@finch9668
6 жыл бұрын
thank you bro, and I am waiting your new tutorials~
@ToskersCorner
6 жыл бұрын
Thank you! I'm unsure how much more I can really cover specifically with WPF that I haven't already. I am considering doing a small series on C# in general, to perhaps attract more 'beginners' to the channel. Though, I assume most of my subscriber base likely doesn't need such a series. I figured starting out with an easy series will help get me into the swing of things again once I find the time. If there is anything you are interested in that I have not already covered, please let me know.
@ahmedezzat6111
3 жыл бұрын
hey, thanks for the video, I have a question, how to route from one view to the other?
@danisabadia5606
4 жыл бұрын
why the class, with the controls is not just ?
@shazzmoe
6 жыл бұрын
Great video, do you happen to have any videos showing how to nest this functionality? For example, having the new view model display a set of buttons and then when those buttons are clicked, another view replaces that view. Edit: I think I found what i needed. Sounds like NavigationService will better serve my purpose
@pedrohenriquebertoldi9323
4 жыл бұрын
is there any way to preserve the data that exist in one view? because when i click to change the view and come back to the same view i get the "Default" view
@AK-sk3rk
7 жыл бұрын
Ok Guys... Can someone explain to me one thing: - if we are setting DataContext to an instance of ViewModel class, - we are binding DataContext of ContentControl and View to this How exactly our App knows it has to load particular view.xaml file? I mean this ViewModel.cs and View.xaml are not connected in any way with the code.
@abijo5052
7 жыл бұрын
They're connected through the datacontext
@walidsalhi9583
3 жыл бұрын
Thank you very much!!!!!!!!!
@DeepakMforTech
4 жыл бұрын
what if I enter some data in RedView Datacontext and then go to Blue View and come back to Red View. Will it reset the DataContext? everytime you click on button.
@c4joshwa664
4 жыл бұрын
I made this code last night and tried launching it this afternoon and the code buttons just don't work anymore :(
@user-ku9ed7ex3e
Жыл бұрын
Thank you
@tuxmc
6 жыл бұрын
Thanks mate! great video.
@tomaszstolarz5384
5 жыл бұрын
Hello.Nice video. I've question. Can it be possible to put in one view button which open another one view?
@WooSup111
4 жыл бұрын
I really appreciate your helping, sharing your skills. I wonder do you make a number of viewmodels classes instead 1 class? they seem like work all the same. I tried with one viewmodel class and it does work. Also, I want to know how to set the default page without clicking any buttons.
@ToskersCorner
4 жыл бұрын
I made multiple just to show how you theoretically would do this with different views/view models. Ideally in a real word scenario each view would be doing something different thus needing different view models.
@eduhza
4 жыл бұрын
It worked like a Charm but sudntly i started to get this error when trying to Initialize the new page: System.Windows.Markup.XamlParseException: 'Page can have only Window or Frame as parent.' Any ideas?
@Eminence43rd
4 жыл бұрын
I can tell that you're a very impatient type of person :D
@BoyOfTheFuture4987
6 жыл бұрын
bro when i change views on button click my window is no longer resizeable or draggable...and no other button clicks are registered my main view has custom chrome style and its data context is set to a view model file...
@arnoldparas3043
5 жыл бұрын
thanks for this man. keep it up
@johannesmohr6333
5 жыл бұрын
Thx works fine. Nice explination ;)
@campbelds
7 жыл бұрын
Great video, I'm having issues with mine because my user control isn't rendering, but otherwise great video.. id love a little more depth as to what everything as doing from a new programmer prospective. otherwise i loved the video, maybe turn up the volume a little ;P
@ToskersCorner
7 жыл бұрын
Yeah, a lot of my older videos had audio problems I was not made aware of till later. If you have problems with any of the code projects or tutorials I cover, feel more than free to contact me via email(ToskersCorner@outlook) or KZitem messaging and I would be more than willing to assist you. Thanks for leaving a comment, Devin!
@randysandberg3755
7 жыл бұрын
Seemed great to me.
@sandroferreira3413
7 жыл бұрын
Great video! Your tutorials are helping me doing my university projects :D Can you please explain the view models need? That parte isnt clear on my mind
@ToskersCorner
7 жыл бұрын
The "view model" is not necessarily "needed". This is just how you would go about it conducting an MVVM type pattern. However, the reason we need a class object(View model) is because the DataTemplate we display is based on the Type of it's DataContext (Which would be the view model) (See 9:45). We tell it, if the DataContext of our window is BlueViewModel, then we want it to display the BlueView. The only way it can know what view to display, is if it can determine what type of DataContext is current(BlueViewModel). Hope I cleared it up a bit!
@AlgPortfolio
7 жыл бұрын
Hello! What are the benefits of using user controls instead of pages? In which cases would be better to use user controls and in which pages?
@ToskersCorner
7 жыл бұрын
Hello, sorry for the late response. The benefits really are that user controls are designed to be, well, controls. They are designed for desktop applications, and allow you to create your own "control" view vs. opening another window. Pages, are primarily intended for a web application or browser application. So, in the end it is not much about "benefit" but more so based on what each is intentionally designed for.
@xmenxwk
5 жыл бұрын
Why go through all that trouble of creating view model classes and data bindings, while you could just set the user control to ContentControl.Content ?
@hologerry
7 жыл бұрын
Awesome tutorial, I am just start learning WPF, i have qustion, how could I put different data to the multipe views, thanks a lot.
@ToskersCorner
7 жыл бұрын
Hey, Gerry. Sorry I didn't respond. I must have missed your comment! For more specific questions I ask that you email them to me at ToskersCorner@outlook.com ! I always check my email and respond as soon as possible. Thanks!
@theturkey2720
4 жыл бұрын
Thanks a lot, man!
@ianfinlayAustralia
7 жыл бұрын
when would you likely use this? view switching? real world examples? (a liitle too abstract to work out why you'd use it)
@ToskersCorner
7 жыл бұрын
You use it pretty much any time you wish the user to navigate to different content. I good example could be my C#.Net Sales Monitoring Tool I have in my videos. Or even my Memory Game which has a little main menu. For another example: In WinForms you normally would open a new window to accomplish these things. With WPF you can make the content of a window dynamic instead of creating new windows every time. Sort of like page navigation in your browser.
@madhu72kumar
7 жыл бұрын
how to use all the three Views displayed on the screen at a time. I want all the three colours to be displayed on the screen at the same time by using datacontext.
@juniorhernandez3014
2 жыл бұрын
It's possible to do this in windows forms? Thanks!
@stanislavbozhikov9046
4 жыл бұрын
very good :)
@puzzles2984
5 жыл бұрын
Wouldn't it be easier to set contentcontroller datacontext to view directly rather than setting it to view model beside that overall nice tutorial.
Пікірлер: 192