Great tutorial. Love it!!! It uncovered WPF issues I didn't even knew existed. Thanks
@wesleykenis1870 Жыл бұрын
When I was working for a company, they had buttons in the window itself (right next to the min/max buttons) for different sizes of screens. These buttons would set the window size for phone, tablet, and pc screens. This allowed us to test the view for different devices without having to constantly resize. This was also just visible in "debug mode". Maybe this can be a nice addition to the tutorial for building "responsive layouts"
@yz777zhumabayev62 жыл бұрын
Great video! Very good tutorial!
@skyax33283 жыл бұрын
Great video. I wondering lets say i didnt like adding the scrollbar but i wanted to set a break point as in web css. I know this is WPF but what are your thoughts on doing this. Would you consider swaping out for a different view that reflects the break point view and using same view model, but is that even possible to have 2 views accessing one viewmodel or would you put both views in the same xaml file and just hide or show one based on window height? Thanks
@SingletonSean3 жыл бұрын
Good question Ken! As someone who is more into web development, I've run into this issue quite often in WPF. I go over a lot of these concepts, such as "breakpoints", in this experimental series: kzbin.info/aero/PLA8ZIAm2I03jN4ORSOeg0Hl-md6RUmX13 I've thought about having 2 views as well. I suppose in that case you could split each view into two different XAML files, then have one files that brings them together and handles the logic of swapping them (via the breakpoint from my series above maybe). It bothers me that there isn't a built in solution in WPF for this. It's like they expect us to be okay with scroll bars, which really isn't too bad since these are strictly desktop applications.
@faraz-online4 жыл бұрын
Sure was another excellent episode no doubt declaring the WPF's XAML to be a deep sea! However in case of a custom button style if I want to grow the width of the button how to align the content in center instead of having it hung on the left only? Anyways, thanks again!
@Saleca4 жыл бұрын
use the horizontal/vertical alignment on the content
@jcturpin87374 жыл бұрын
I'm still working my way through your great tutorials. As a heads up, I was wondering if you have plans to, or could show how to make a templated Data-Grid that binds to database data, allowing for crud operations through the grid itself, or with some similar WPF best practice way of achieving that type of functionality. Something Excel-ish, but with customizable cells. Also, perhaps with the ability to query/paging. Just a thought. You're doing a great job, I look forward to finishing up lesson 6 now. ;-)
@SingletonSean4 жыл бұрын
Hey again JC, I think that has been requested by other viewers as well. I've been thinking of a way to integrate that with this series. Thank you :)
@jcturpin87374 жыл бұрын
This is just a thought, but I think this project would lend itself beautifully to this idea while incorporating the aforementioned functionality. Feel free to implement/modify/ignore it. I'm just going to spitball some possibilities, but the end target I'm hoping for would be a complex datagrid :-) Since this is a stock trading program I think it would be neat to see the stocks visually rise and fall in real time. While that is a neat idea and would add a new dimension to the WPF program, the idea behind it is that it could create a dataset to display on a datagrid. For instance, while viewing the green/red graph rise and fall a user could hit a 'record' button to save the data to the database. This idea is lending itself to possibly two new views though, one for the graph and one for the datagrid. Personally, I would like to see a datagrid that implements all CRUD operations, operating against at least two different tables. Random idea list: -Perhaps the datagrid could be 'based' on a users purchases, showing all purchases -Maybe a new field, "Watching" could be added, where a user could keep an eye on how a certain stock is doing without committing yet to a purchase. -Matby there could be a dropdown combobox of pre-populated stock types that aren't already purchased, which could be selected to be watched. -If the grid shows 'purchased' and 'watching' type stocks, they could numerically update in real time on the datagrid. Then a user could 'sell', 'buy', remove from watch through the datagrid itself. -Perhaps a bit contrived, there could be a notes field attached to the row, which would allow for an easy way to perform all CRUD operations. -The grid itself could be a showcase for how to create/use various custom controls. -If stocks have an icon, that icon could be included in a field in the row, which could should how to make a custom template with image. -There could be a field on purchased stocks that shows a calculation based on how much that stock has increased/decreased since purchase... -Perhaps an Admin type could be implemented, to view all users purchases/Accounts, while keeping each others data hidden from each other. -Paging would be nice to see implemented, perhaps from having a lot of recorded data. -Queries would be awesome, ie show all stocks above x between these 2 times... -Or maybe how to make a dynamic, open-ended query for 'power users' -Implementing a different UI after completing the WPF portion, like ASP.NET MVC or React or Angular, to illustrate the usefullness of how the backend was architected with interfaces, and/or oppositely figuring out how to swap out EF with Dapper... and then do processing comparisons. I'm just throwing out ideas and the list grew beyond what I set out to write, lol. I don't mean to be overwhelming, but as a programmer I have fun brainstorming possible features. Even if you don't decide to or have time to implement any of them, thank you for this series, it's been fun and has really helped me out! God Bless.
@jcturpin87374 жыл бұрын
When you use TemplateBinding in the Common Styles for the Button, I see Setter properties that match the first two, the Background and Padding, but then you TemplateBinding to Margin, is margin being set anywhere or what is it binding to for Margin?
@SingletonSean4 жыл бұрын
Hello JC, it is binding to the margin that gets set when we create the button. The margin on the button will be applied to the TemplateBinding.
@PinchOfLuck4 жыл бұрын
Too damn complicated for such a simple thing.
@SingletonSean4 жыл бұрын
Hey Robert Ra, thank you for the constructive criticism. However, I can't quite find the complicated part of this video. Then again, I did create the video, so it may not seem complicated to me. Please let me know what you are having trouble with or if you have suggestions to decrease complexity. Glad you're enjoying the series Robert Ra!
@Saleca4 жыл бұрын
i would not change a bit. it was great.
@marilu91384 жыл бұрын
The code patterns seem complicated, but they help to decrease the code when the project is long and repetitive. In addition, working with architectures helps the maintainability of the code, because all programmers do it the same as that architecture. The tricky thing is learning all the tricks.
@skyax33283 жыл бұрын
This is WPF where things are simple in theory, but what makes it hard is remembering all the code syntax for different things. That scrollbar templatepart in the textbox is just wierd, but i think that is the way Microsoft definded it in the orginal textbox template so thats why he did it that way.
@skyax33283 жыл бұрын
@@SingletonSean I think the video was good, but newbies to WPF may not know that controls are lookless and the visuals we see are coming from templates Microsoft gave us and you are just modifing parts of that default template. That was the only thing that was a little confusing to me when i first started learning WPF.