Live data from Hacker News

Calling Windows 10 APIs from a WinForms or WPF application

blogs.windows.com

11–20 of 71 posts

Re: Calling Windows 10 APIs from a WinForms or WPF application

#11

Earlier quoted context omitted.

The Windows 10 API provides API availability checks. So you target the latest version but then add checks to see what API's are available. This is nice because it encapsulates both OS version API differences and device capabilities. https://blogs.windows.com/buildingapps/2015/09/15/dynamicall... using Windows.Foundation.Metadata; if(ApiInformation.IsTypePresent("Windows.Media.Playlists.Playlist")) { await myAwesomePl…

Unfortunately that's a Windows 10 API, meaning it isn't very useful for older versions of Windows!

In that case, you put your Windows 10 stuff in a different .dll that doesn't get deployed on old versions of Windows.

The article has an example.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#12
As a user i find going the other way more troubling.

Say i want to use a UWP file manager on Windows 10. Out of the box the folders i can access are limited, and adding more require that i use the age old Win32 file picker window.

Similarly both Google and Mozilla stopped developing a UWP native UI for their web browsers, as it would only be active if the browser was set as the default one. Something that is not always desirable.

So from a user perspective, UWP feels bolted on rather than a integrated part.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#13
post #9

I absolutely love WPF development. I'm all web now, and I love it too, but sometimes I just wish I could go back to the good old WPF days! The extensive tooling involved with frontend web development and the constant religious wars between frameworks can get exhausting.

I moved from Web back into Forms, WPF and Android.

Couldn't be happier and dread of the next time I will have to switch customers, because of the high probability to return to web.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#14
post #9

I absolutely love WPF development. I'm all web now, and I love it too, but sometimes I just wish I could go back to the good old WPF days! The extensive tooling involved with frontend web development and the constant religious wars between frameworks can get exhausting.

Why not port WPF to the web?

Re: Calling Windows 10 APIs from a WinForms or WPF application

#15
post #9

I absolutely love WPF development. I'm all web now, and I love it too, but sometimes I just wish I could go back to the good old WPF days! The extensive tooling involved with frontend web development and the constant religious wars between frameworks can get exhausting.

As a mostly C++/.NET dev since over a decade, I've tried to embrace the "modern web" a bit more, but as soon as I did... Web development in 2016 feels comparatively _insane_ to a dev used to structured .NET full stack development in a big IDE made for the purpose, on a platform with slow incremental improvements over the years with a vision and coherence from a single company.

It's like assembling a castle from bricks of lego where each brick changes shape every 6 months. Jesus. I feel burnt out before I barely begin! And when I've settled on something, it's about the toolchain and distribution models. "Is it Webpack or Gulp or Browserify and what is a docker image anyway or should I just use Meteor..."

There _are_ options for people like me. Angular 2, EmberJS, big hunking frameworks like those. But then the problem instead becomes that it's hard to grow your web apps organically. The startup... You have to build a huge garden of Eden surrounding it, and only then can you ship your "Hello world". So exhausting before I've barely got started. Besides, what do these big frameworks even _do_ for me behind the curtains? I don't understand the underpinnings. I just have to trust the docs and that they don't change.

So then I tell myself "oh f all that" and build a fun Web API in Python and Flask. And hack raw HTML and CSS in a text editor. The minimalist, pretty code and lack of 100 MB's of dependencies is too alluring. I feel like I'm forced to give up. How in the world will I have enough spare time and energy after full time job days to get even just average experience in the main JS frameworks of today and keep up with "what you have to know in 2017/18/19"? I also feel like the JS world suffers a lot from not settling down, from experience hugely underestimated. It takes time to mature, and create a high quality, broad ecosystem and community. I sometimes think of the waste from the community being this fragmented, keeping to reinvent the wheel.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#16
Look at this screenshot of context menus in Windows 10 https://pbs.twimg.com/media/C2Y6rwoXEAAaQll.jpg:large win32, MFC, WinForms, WPF, Web.. Why don't stick to 1 framework and make it work good, deprecate rest, why have multiple buggy and ugly. If compare HTML/CSS and WPF improvement over last 15 years it is 10000 to 1. WPF could have been great 5 years ago, but I'm not sure it ever will be.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#17

Look at this screenshot of context menus in Windows 10 https://pbs.twimg.com/media/C2Y6rwoXEAAaQll.jpg:large win32, MFC, WinForms, WPF, Web.. Why don't stick to 1 framework and make it work good, deprecate rest, why have multiple buggy and ugly. If compare HTML/CSS and WPF improvement over last 15 years it is 10000 to 1. WPF could have been great 5 years ago, but I'm not sure it ever will be.

Because Microsoft supports critical applications that businesses use for well over ten years in a lot of cases. Zero other operating systems have to provide the platform stability that Microsoft does.

So, of course, if they have to focus on supporting only one, archaic platform, they never move forward or create anything new or improved. Which doesn't make sense. So you continue to create newer, better platforms, but continue to support the old ones for years to come. Eventually, older ones fall out of use and can eventually be retired.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#18

Look at this screenshot of context menus in Windows 10 https://pbs.twimg.com/media/C2Y6rwoXEAAaQll.jpg:large win32, MFC, WinForms, WPF, Web.. Why don't stick to 1 framework and make it work good, deprecate rest, why have multiple buggy and ugly. If compare HTML/CSS and WPF improvement over last 15 years it is 10000 to 1. WPF could have been great 5 years ago, but I'm not sure it ever will be.

Because Microsoft supports critical applications that businesses use for well over ten years in a lot of cases. Zero other operating systems have to provide the platform stability that Microsoft does. So, of course, if they have to focus on supporting only one, archaic platform, they never move forward or create anything new or improved. Which doesn't make sense. So you continue to create newer, better platforms, but…

They only have to provide this because they lock down their products. They do it to themselves.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#19

As a user i find going the other way more troubling. Say i want to use a UWP file manager on Windows 10. Out of the box the folders i can access are limited, and adding more require that i use the age old Win32 file picker window. Similarly both Google and Mozilla stopped developing a UWP native UI for their web browsers, as it would only be active if the browser was set as the default one. Something that is not alwa…

I find UWP pretty terrible. :( It feels like developing for a weakest link (the traditional cross-platform problem) which is often Windows Phone or something. Which doesn't exist!! Windows Phone doesn't bloody exist! If MS had amazing mobile market penetration UWP would be amazing but what is this?! How is UWP exactly better than WPF for Windows desktop apps? It isn't. But it's where MS now wants you to be, because they have crazy deeams.

Re: Calling Windows 10 APIs from a WinForms or WPF application

#20

Look at this screenshot of context menus in Windows 10 https://pbs.twimg.com/media/C2Y6rwoXEAAaQll.jpg:large win32, MFC, WinForms, WPF, Web.. Why don't stick to 1 framework and make it work good, deprecate rest, why have multiple buggy and ugly. If compare HTML/CSS and WPF improvement over last 15 years it is 10000 to 1. WPF could have been great 5 years ago, but I'm not sure it ever will be.

+ All your apps look the same

- Half of your apps are no longer supported

I think mostly everyone who uses their computer to make their living (ie the prime audience of MS) does not consider this a good trade-off

Post reply on HN