Omg i had the hover issue last week and spend ages trying to find a clear explanation for why some examples work and other didn't. Thanks for the video!
Thanks a lot for this tutorial!! I tried a few times the MSFT own text tutorials, but for me it was too difficult to understand it in the deep. Here i understood 3 important things within a minute! 🙂
Great tutorial man! Just one question, is there any way to like create a resource file somewhere and just import them to your current window, and it will then auto override all the controls? I just kinda find them a bit annoying clucking on the top of the project file.
Thanks! I think what you are looking for is creating and including resource dictionaries. You can keep all of your styles (explicit and global) in separate files and then merge those dictionaries into your App.xaml and use the styles across your entire project. (or you could do a specific window/usercontrol) I have a bit about doing it here: th-cam.com/video/F7DiRnH6Yqo/w-d-xo.html and here's a link to a text example: learn.microsoft.com/en-us/windows/apps/design/style/xaml-resource-dictionary#merged-resource-dictionaries
@@KampaPlays Thank you so much for the answer! I have one more question: based on your tutorial series, say I have a usercontrol that has a textbox and button. I then call the usercontrol multiple time on my main window just like in the tutorial (eg last name texbox, first name textbox). Each button when pressed, should save their textbox's value on a string on the main window. How can I achieve something like this? Thank you!
In that case you will need a way for your mainWindow to know that the button has been clicked. You *could* pass your mainWindow to your usercontrols, and use it to call some method in mainWindow when your button is pressed. A better (less-coupling) way to do it would be to create an event in your user control that you invoke on button click, and when your controls are created in mainwindow, subscribe to these events. Events are a bit more advanced of a C# topic, but they are extremely useful, and I recommend looking into them! learn.microsoft.com/en-us/dotnet/standard/events/ (Check the code under the "Events" and "Event Handlers" sections for examples of what I'm talking about)
when i select "convert to new resource" i see the dialog popup, i fill it out and select ok and it puts in the basic stuff with nothing else, no "button.mouseover.background" or anything else, just the normal background color, would that be because i already have a "buttonstyle.xaml" defined from watching your previous video where you taught us about the resource dictionary? UPDATE: Yes it was lol, i just removed the original style from the resource dictionary and tried again and it added all the extra template stuff.
I have a custom app that I am creating and I am using custom UI textures so it doesn’t look like the standard app at all. In that app I am using treeview and I want to change the look of the scroll bar to match the rest of the app. How can I do that?
Hello Krampa, thanks a lot for the courses they are great no matter the fact the I work in C# around 2 years and that I know most of the stuff, I still just enjoy listening and watching your courses from the beginning :D Truth to be told I still find quite difficult to understand how the progress bar is working. I don’t mean like normal value that is changing just by adding ++ I mean by using BackgroundWorker class. Can you please make a video and try to explain who should we use PB during async scenarios and how to guess how long the process will take? Thank you very much.
Thanks so much! Great suggestion. The progress bar is one of the trickiest controls when you throw in multithreading, because its not very intuitive on how it's supposed to be used. I will add this to my list of todos!!
I didn’t know we can create a template by clicking on the properties’ style! It would be great if you can make a video of custom listview. Just saying.haha. Thanks for the video! 😆
Hey, thanks for the great tutorials! I hate having to ask for help, but when I try "Convert to New Resource" for the button style, that option is grayed out. I'm using VS 2017 pro edition. Do you know if that isn't available in the version I'm using or if there's something else that would make it unavailable? Thanks.
Sorry may i ask this: I had set : , why when I changed : , it wouldn't make other button also change it to blue but only the button that i had set style="{ StaticResource button9}"? Isn''t the SolidColorBrush also a Global style?
Hi, is there a way I can contact you? I am really going crazy to change the mouseover property of a combobox. Let me know thanks a lot, your tutorials are really helpful
Thanks! It comes with time and repetition, just like anything. I can recall a large portion of .NET and WPF from memory, but I still check the documentation regularly for things that I don't use often. One piece of advice I give is to write it out as often as you can instead of copy/paste, and you will be able to remember/understand it better. Typing/entry speed is insignificant compared to the time it takes to properly solve the problem!
Thanks! I don't think I have anything on this specifically yet, but you can use "DataTrigger" to use bindings to regularly defined properties. Check out the "DataTrigger" section here, it might help out: wpf-tutorial.com/styles/trigger-datatrigger-event-trigger/
When I added The "Control Template" it shrinks the buttons down to nothing and I have stretch them out. Why is this? The buttons height and width are not set, but I don't need them to be.
When you override the default control template with a blank template it loses all of its standard formatting. What you are describing may be a missing Horizontal/Vertical Alignment of "Stretch". Let me know if this isn't what you meant.
Hey :) First of all, thanks for this tutorial series. I´m just learning WPF and this is by far the best explanations i´ve seen. One question tho. Is there a posibility, to group items into a Grid Row/Column? So instead of saying: it would sometimes be easier to just say Do you know, if this is possible? Thanks :)
Thank you, and definitely! You can put the objects into a parent container of some sort and set that parent's column/row. Grid is quick and easy but sometimes you may want a StackPanel/ScrollViewer/something else specific for your controls to live in.
@@KampaPlays Thanks :) Didn´t read your answer until now, but i found it out by myselfe. I just had to create a new grid, put it in the row/column i want and put everything in that grid. Instead of just typing like i wrote.. Thanks :)
The previous video #20 (th-cam.com/video/F7DiRnH6Yqo/w-d-xo.html) shows how to make the style reusable both explicitly and application wide. Hope this helps!
Omg i had the hover issue last week and spend ages trying to find a clear explanation for why some examples work and other didn't. Thanks for the video!
Haha! I know that feeling. Glad it helped!
As always, your video is awesome! I'm again amazed by your proficiency on C# WPF. Thank you very much for making this series 😊😊
Thank you for the kind words, glad it is helpful!
Thanks a lot for this tutorial!! I tried a few times the MSFT own text tutorials, but for me it was too difficult to understand it in the deep. Here i understood 3 important things within a minute! 🙂
Thanks, glad to help!!!
Thank you for providing the videos.
It is useful to me as a WPF beginner.
Very glad it is helpful!
Eagerly waiting for your next video
Thank you, I'm a bit behind because of work but I should have the 1st MVVM video out Monday or Tuesday!
thank you so much, learned a lot and never knew you could just take the default style like that!
thank you... love all these tips... just brilliant.
Thanks!!!
Keep up the amazing work
Thanks so much!!
Thank you very much for this awesome Series!
Glad to help!!
It's very useful video! Thank you for your work!❤
Thank you!!!
DUDE!!! Great vid and thanks!
very simple and usefull describe for a complicated stuff :) thanks
IT WORKS ON new version. You dont have to REDEFINE content template
Thank you, a highly useful video!
Great tutorial man! Just one question, is there any way to like create a resource file somewhere and just import them to your current window, and it will then auto override all the controls? I just kinda find them a bit annoying clucking on the top of the project file.
Thanks!
I think what you are looking for is creating and including resource dictionaries. You can keep all of your styles (explicit and global) in separate files and then merge those dictionaries into your App.xaml and use the styles across your entire project. (or you could do a specific window/usercontrol)
I have a bit about doing it here:
th-cam.com/video/F7DiRnH6Yqo/w-d-xo.html
and here's a link to a text example:
learn.microsoft.com/en-us/windows/apps/design/style/xaml-resource-dictionary#merged-resource-dictionaries
@@KampaPlays Thank you so much for the answer! I have one more question: based on your tutorial series, say I have a usercontrol that has a textbox and button. I then call the usercontrol multiple time on my main window just like in the tutorial (eg last name texbox, first name textbox). Each button when pressed, should save their textbox's value on a string on the main window. How can I achieve something like this? Thank you!
In that case you will need a way for your mainWindow to know that the button has been clicked. You *could* pass your mainWindow to your usercontrols, and use it to call some method in mainWindow when your button is pressed. A better (less-coupling) way to do it would be to create an event in your user control that you invoke on button click, and when your controls are created in mainwindow, subscribe to these events. Events are a bit more advanced of a C# topic, but they are extremely useful, and I recommend looking into them!
learn.microsoft.com/en-us/dotnet/standard/events/
(Check the code under the "Events" and "Event Handlers" sections for examples of what I'm talking about)
@@KampaPlays Do you have any video tutorials for this?
Not yet, it's on my list for the more intermediate/advanced Playlist i want to do next.
when i select "convert to new resource" i see the dialog popup, i fill it out and select ok and it puts in the basic stuff with nothing else, no "button.mouseover.background" or anything else, just the normal background color, would that be because i already have a "buttonstyle.xaml" defined from watching your previous video where you taught us about the resource dictionary?
UPDATE: Yes it was lol, i just removed the original style from the resource dictionary and tried again and it added all the extra template stuff.
Good catch, and good problem solving!! I didn't think to mention this, but I bet this comment will help someone else!
Worked for me as well, thanks!
This helped me too! Thanks.
I have a custom app that I am creating and I am using custom UI textures so it doesn’t look like the standard app at all. In that app I am using treeview and I want to change the look of the scroll bar to match the rest of the app. How can I do that?
Hello Krampa, thanks a lot for the courses they are great no matter the fact the I work in C# around 2 years and that I know most of the stuff, I still just enjoy listening and watching your courses from the beginning :D Truth to be told I still find quite difficult to understand how the progress bar is working. I don’t mean like normal value that is changing just by adding ++ I mean by using BackgroundWorker class. Can you please make a video and try to explain who should we use PB during async scenarios and how to guess how long the process will take? Thank you very much.
Thanks so much!
Great suggestion. The progress bar is one of the trickiest controls when you throw in multithreading, because its not very intuitive on how it's supposed to be used. I will add this to my list of todos!!
Thank you very much for this playlist
Please make MVVM CRUD EF and Dependency injection small application
Great Explanation
Thank you! I will add these to my list. I'm working on MVVM now!
Thank you :) This is nice :D
Thank you !!
I didn’t know we can create a template by clicking on the properties’ style! It would be great if you can make a video of custom listview. Just saying.haha. Thanks for the video! 😆
Glad to help! Will add it to the list!
Why at 4:50 the target type magically become "{x:Type Button}" from "Button"?
That is an excellent question. I'm honestly not sure at this point what I did there. Sorry for the confusion.
Wonderful
Thank you!
Hey, thanks for the great tutorials! I hate having to ask for help, but when I try "Convert to New Resource" for the button style, that option is grayed out. I'm using VS 2017 pro edition. Do you know if that isn't available in the version I'm using or if there's something else that would make it unavailable? Thanks.
Sorry may i ask this:
I had set :
,
why when I changed :
,
it wouldn't make other button also change it to blue but only the button that i had set style="{ StaticResource button9}"?
Isn''t the SolidColorBrush also a Global style?
awesome💓
Thank you!!
Hi, is there a way I can contact you? I am really going crazy to change the mouseover property of a combobox. Let me know thanks a lot, your tutorials are really helpful
thanks a lot
Happy to help!
Excellent video, but how does one remember this wide range of WPF material when working on a big project?
Thanks! It comes with time and repetition, just like anything. I can recall a large portion of .NET and WPF from memory, but I still check the documentation regularly for things that I don't use often.
One piece of advice I give is to write it out as often as you can instead of copy/paste, and you will be able to remember/understand it better. Typing/entry speed is insignificant compared to the time it takes to properly solve the problem!
thx, man
welcome! glad to help.
How would you bind some Property to a Trigger Value?
Love your Videos!
Thanks!
I don't think I have anything on this specifically yet, but you can use "DataTrigger" to use bindings to regularly defined properties. Check out the "DataTrigger" section here, it might help out:
wpf-tutorial.com/styles/trigger-datatrigger-event-trigger/
When I added The "Control Template" it shrinks the buttons down to nothing and I have stretch them out. Why is this? The buttons height and width are not set, but I don't need them to be.
When you override the default control template with a blank template it loses all of its standard formatting. What you are describing may be a missing Horizontal/Vertical Alignment of "Stretch". Let me know if this isn't what you meant.
Hey :)
First of all, thanks for this tutorial series. I´m just learning WPF and this is by far the best explanations i´ve seen.
One question tho.
Is there a posibility, to group items into a Grid Row/Column?
So instead of saying:
it would sometimes be easier to just say
Do you know, if this is possible?
Thanks :)
Thank you, and definitely! You can put the objects into a parent container of some sort and set that parent's column/row. Grid is quick and easy but sometimes you may want a StackPanel/ScrollViewer/something else specific for your controls to live in.
@@KampaPlays Thanks :) Didn´t read your answer until now, but i found it out by myselfe. I just had to create a new grid, put it in the row/column i want and put everything in that grid. Instead of just typing like i wrote.. Thanks :)
Sir hopefully you build project have database.
I will add database integration to the to-do list! Thanks!
How do I put the style template in a separate file and how do I use it then?
The previous video #20 (th-cam.com/video/F7DiRnH6Yqo/w-d-xo.html) shows how to make the style reusable both explicitly and application wide. Hope this helps!
thanks a lot@@KampaPlays
12:15 xamllll heelllllllll ,,,,,,, definitely different file ...with proper name......
Thanks a lot