Live data from Hacker News

Calling Windows 10 APIs from a WinForms or WPF application

blogs.windows.com

61–70 of 71 posts

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

#61
post #56

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.

The philosophy of WPF is that you do all of the UI yourself. It gives great flexibility to make anything look like anything else, but it provides a subpar experience if you mostly need your app to be functional, vs winforms. And as you point out it kills any form of standardisation. What's missing to WPF is good tooling. The current tooling in VS is nothing more than an XML editor, without a useful intellisense, and…

I wouldn't say it's encouraged to give every control a custom look. It can be done, and far more easily and useful than in Windows forms, but that doesn't mean you have to use it in every application. Horrible owner-drawn controls have been a thing before WPF and just because WPF has better separation between appearance and behaviour doesn't cause inconsistent looking UIs without the developer doing weird things.

The tooling you look for is probably Blend.

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

#62
post #34

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…

> 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 Woha. That is pretty crazy.

It's not like Google ever cared much, though. The 'metro' Chrome was exactly the same, just full screen. Still unusable with touch, because of the same tiny hit boxes for controls. They just drew their normal UI (which is completely custom anyway) with a different flavor of DrawBitmapToScreen.

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

#63
post #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 t…

Windows Phone still exists. A lot of companies are still buying a lot of Windows Phones. But you will not get them in a customer store, they're OEM phones. Also Windows IoT is and will be used a lot in POS systems, refrigerators, cars, and so on. In this case, UWP makes a lot of sense. But you will never read about it in you famous news blog or paper.

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

#64
post #60
post #58

Earlier quoted context omitted.

The problem is that they keep compiling the same version of Excel, just changing a little bit the color scheme each time.

Word, Excel, PowerPoint were all coded between 1989 and 1993. And received major update with Word 6 and Office 95 and 97. Basically Office 97 was feature complete. Very little has changed since then. The ribbon bar and all the other minor increment improvements are really minor compared to the changes up to Office 97. Office uses it's own UI library. Using Word 6 in Win95 shows floating toolbars in Win3.1 UI theme. O…

Well, MS removed quite a few ridiculous features from the Office 97 days. Like auto summary or Cliparts.

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

#65
post #33

Earlier quoted context omitted.

> There _are_ options for people like me. Angular 2, EmberJS, big hunking frameworks like those. The biggest problem isn't just that, it's that those big frameworks change fairly frequently too. I've witnessed web projects go from backbone to angular to react in the span of a year. I'm mainly a Qt dev, however I needed to add a Cesium component to the application I'm working on. What a mess. Everything about the java…

I haven't found a compelling reason to move away from Backbone yet. It's not perfect, but it does the essentials and it is very stable and well understood. Might be the relatively reasonable size of the projects I have going. But it works well for a lot of stuff. I think a lot of the problem comes from fear of projects becoming obsolete. Ultimately JS/CSS/HTML isn't going to fundamentally transform in short order.

Backbone is definitely stable and solid, and there's a bunch of good addons in the ecosystem that build on it (particularly Marionette for lifecycle handling and more advanced views, Ampersand for a better Model/State class, and Epoxy for data binding).

That said, having built a Backbone app, and then gotten into React+Redux, I'm all in on React and Redux as a better way to build apps. It's a much more consistent mental model, and makes tracing data flow much easier.

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

#66
post #15

Earlier quoted context omitted.

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 brick…

> There _are_ options for people like me. Angular 2, EmberJS, big hunking frameworks like those. The biggest problem isn't just that, it's that those big frameworks change fairly frequently too. I've witnessed web projects go from backbone to angular to react in the span of a year. I'm mainly a Qt dev, however I needed to add a Cesium component to the application I'm working on. What a mess. Everything about the java…

I've built three web apps using Cesium, so I'm familiar with some of its complexities. The first uses GWT/SmartGWT, the second uses Backbone, and the third uses React+Redux+Webpack. Of the three, I'm the happiest with the React+Redux one so far.

I'm actually hoping to write a blog post in the next few weeks discussing how to use Cesium with React+Webpack: basic setup, using React to render Cesium primitives, and then advanced Webpack setup for code splitting.

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

#67
post #60

Earlier quoted context omitted.

Word, Excel, PowerPoint were all coded between 1989 and 1993. And received major update with Word 6 and Office 95 and 97. Basically Office 97 was feature complete. Very little has changed since then. The ribbon bar and all the other minor increment improvements are really minor compared to the changes up to Office 97. Office uses it's own UI library. Using Word 6 in Win95 shows floating toolbars in Win3.1 UI theme. O…

Well, MS removed quite a few ridiculous features from the Office 97 days. Like auto summary or Cliparts.

But removed some quite useful features at the same time, like the ability to customize the UI by moving the most frequently used buttons to the front.

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

#68
post #54

Earlier quoted context omitted.

It's as easy as disabling it in your browser options. You can purify your own web in seconds!

It doesn't help if the web site is JavaScript only!

Pure html/css can't do everything javascript can. You can't have it both ways.

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

#69
post #54

Earlier quoted context omitted.

It doesn't help if the web site is JavaScript only!

Pure html/css can't do everything javascript can. You can't have it both ways.

Of couse it can't, that is the whole point.

The web should be HTML/CSS for hyperlinked documents only, for everything else native apps.

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

#70
post #63
post #19

Earlier quoted context omitted.

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 t…

Windows Phone still exists. A lot of companies are still buying a lot of Windows Phones. But you will not get them in a customer store, they're OEM phones. Also Windows IoT is and will be used a lot in POS systems, refrigerators, cars, and so on. In this case, UWP makes a lot of sense. But you will never read about it in you famous news blog or paper.

You can still get them in European stores.

Actually when my S3 dies, I will most likely keep using one of those ones instead.

Post reply on HN