C
C#12mo ago
AceChewy

Wpf

Just hoping for some WPF resources anyone would recommend given I have a 3 week Christmas holiday and it would be a good chance to learn some Wpf
38 Replies
AceChewy
AceChewyOP12mo ago
Ones that explain the mvvm structure would also be very helpful
Mayor McCheese
Mayor McCheese12mo ago
I'd consider looking into getting a grounding with WPF; WPF is basically dead ( opinion ). It was moved to the place where software goes to die at MS. I'd start here though https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/february/patterns-wpf-apps-with-the-model-view-viewmodel-design-pattern
Sir Rufo
Sir Rufo12mo ago
Well, it is dead for a couple of years (according to the opinion of some) and it runs on .net8 which has LTS until November 2026 - so safe for the next three years
Mayor McCheese
Mayor McCheese12mo ago
I think it's worth getting a core grounding; and understanding for sure.
DΣX
DΣX12mo ago
i agree, BUT its still the most versatile UI framework for dotnet. And extremely stable (because its arround for so long). also it layed the groundwork of other frameworks. so you will be comfy when using somethign else
AceChewy
AceChewyOP12mo ago
Any suggestions for something more long term? After getting to know WPF more I've heard of MAUI but I know very little about that (I think I've heard a bit on Avalonia)
Mayor McCheese
Mayor McCheese12mo ago
I mean, I would get a solid grounding on wpf for sure
DΣX
DΣX12mo ago
going with maui is a good approach, if microsoft irons out the current issues with the desktop libs. currently its mostly optimized for mobile but the ui design syntax is similar to wpf the tooling is just not there yet. no designer, no blend
Mayor McCheese
Mayor McCheese12mo ago
I mean, wpf designer I'd avoid, I'm assuming I might avoid in Maui too
DΣX
DΣX12mo ago
why would you avoid it?
Mayor McCheese
Mayor McCheese12mo ago
some folks like to see it as a mirror; drag and drop in wpf designer is generally a poor experience.
DΣX
DΣX12mo ago
i see it as a great prototyping tool which you can refine in code lateron. gives quick and easy success and saves so much time. but ive grown up with the designer and blend. so i guess im biased
Mayor McCheese
Mayor McCheese12mo ago
I really want to like blend like ... really but as far as the vs designer, typing xaml is frequently just faster
DΣX
DΣX12mo ago
interesting. ive had similar encounters with other ppl, who didnt seem to appreciate the designer allot. personally i just never figured out why ppl have fun writing xml. its so much easier to just drag and drop stuff. not having to know all the proerties and controls. its a blessing
Mayor McCheese
Mayor McCheese12mo ago
are you using databinding and mvvm and such? or are you basically winforms with wpf? and unless the designer has gotten better, dragging controls on pretty much creates terrible positioning.
DΣX
DΣX12mo ago
skill issue 😄 i have to admit, it was actually better in the past. also i am not currently developing with wpf, so my experience is a bit outdated back in the day i was doing databinding and stuff. and even using dev data in the ui and similar nifty features. it was just a whole experience. it was just a little too dev-heavy for an actual designer to use, so it failed its target group a littlebit
Mayor McCheese
Mayor McCheese12mo ago
I write an opinionated and aggressive time box application in wpf; basically you couldn't pause the timer, but the controller could add time at their discretion
AceChewy
AceChewyOP12mo ago
Ok thanks for the suggestions I think I’ll go from WPF to Avalonia once I’ve got the basics down
DΣX
DΣX12mo ago
do you "need" cross platform? or is it just to learn? maui will take a bit to become more stable, but i belive it will be the future
Mayor McCheese
Mayor McCheese12mo ago
The "future" will be when ms buys avalonia
DΣX
DΣX12mo ago
isnt avalonia basically exactly the same stuff just without desktop? ah no it supports all the things even webassembly sounds great tbh 😄
Mayor McCheese
Mayor McCheese12mo ago
No one really wants ms to buy Avalonia
AceChewy
AceChewyOP12mo ago
Just to learn It's mainly for a coding project I need to submit next Christmas, which needs to be an app with a GUI
Mayor McCheese
Mayor McCheese12mo ago
Like a whole year?
AceChewy
AceChewyOP12mo ago
We don’t start until May of this year but I thought it might be a good idea to learn how to make a nice GUI in advance since I have exams next year which dictate the grades I apply to uni with
Mayor McCheese
Mayor McCheese12mo ago
I'm glad to see someone planning, usually it's I have an assignment that's been known for 6 months; now I need someone to do it tonight for the morning. Halp!
AceChewy
AceChewyOP11mo ago
Yh, I’ve never really understood why that’s seemingly the default. I prefer to work on things throughout the given time since it is easier I realise that the MVVM model is quality useful but I still find it a bit difficult to understand how each separate component works @🧨 New Years Mayor McCheese 🧨 @DΣX
Mayor McCheese
Mayor McCheese11mo ago
Can you elaborate?
AceChewy
AceChewyOP11mo ago
So I now the view is where you use XAML to make the visual components, and the view model handles the logic for the different interactive elements (I think) I don’t know what the model itself does
Mayor McCheese
Mayor McCheese11mo ago
In some cases they're the same thing
AceChewy
AceChewyOP11mo ago
Ah, that’s more confusing
Mayor McCheese
Mayor McCheese11mo ago
This https://github.com/devdevdeveau/wpf-timebox/tree/main is an old app I wrote ( I've not migrated from .net framework ), given the MainWindowViewModel, my model is the CountdownTimer class https://github.com/devdevdeveau/wpf-timebox/blob/main/TimeBox/ViewModels/MainWindowViewModel.cs it's all pretty conflated though
AceChewy
AceChewyOP11mo ago
@🧨 New Years Mayor McCheese 🧨 I was hoping I could get your advice on something kind of related to this
Mayor McCheese
Mayor McCheese11mo ago
Oh?
AceChewy
AceChewyOP11mo ago
So from what others on this server have said, C# isn't really used that often for desktop applications and has most of it's use on web apps (which i figured) and so I was hoping to ask if you had anything to say about this eg, as in, would desktop development be a better to delve into or should I prioritise learning how to make web apps and how they work as it's likely going to be the type of software development that employers are looking for I should probably have asked this in the careers section but I don't think it'll hurt to ask around (especially given that I know I want to do a software engineering degree but don't know what sort of develpment eg. web, mobile etc.. is best (most familiar with desktop apps though I am a beginner). If I know web dev is best, I think learning blazor would be better even though I know you can still use WPF Sorry for the mouthful
Mayor McCheese
Mayor McCheese11mo ago
in the enterprise desktop is a thing but it's quickly vanishing WPF isn't bad to learn though, it can give you a good grounding on MVVM, and xaml
AceChewy
AceChewyOP11mo ago
Ah OK, thanks Since that's the case, do you think I should prioritise learning blazor but still look through the WPF stuff
Mayor McCheese
Mayor McCheese11mo ago
I try not to overthink that stuff, learn whatever is comfortable, but consider that in learning, you're going to learn things that are applicable to other concepts. ¯\_(ツ)_/¯ From one thing know ten thousand things.
Want results from more Discord servers?
Add your server