I'm mostly a .Net person at the moment, but I've been playing with Java some lately-- exploring what's out there.
Now I'm looking for the Java equivalent for WPF. I know I could find an OpenGL library or two out there, but that's not really as rich or simple as the WPF system.
Universal Windows Platform. Both Windows Forms and WPF are old, and Microsoft is pointing developers towards its Universal Windows Platform (UWP) instead. UWP is an evolution of the new application platform introduced in Windows 8 in 2012.
It may indeed get phased out eventually “The WPF's goal in user interface and graphics rendering in the . NET Framework 3.0 release is to provide a windowing system for the desktop environment on Microsoft Windows.
In WPF there is a collection of the open Windows in the Application class, you could make a helper method to check if the window is open. Here is an example that will check if any Window of a certain Type or if a Window with a certain name is open, or both. Show activity on this post. Show activity on this post.
WPF stands for Windows Presentation Foundation. It is a powerful framework for building Windows applications.
I think a combination of JavaFX, Swing, Java2D, and Java's browser-based JRE comprise the solutions that WPF provides:
I've programmed Aqua, Macintosh Quick Draw, Windows GDI and GDI+, Qt, and .NET Winforms and WPF is by far the most sophisticated API I've used. Although it has a pretty capable feature set that's better than preceding technologies such as swing, it's no match for WPF. It solves some major problems that have plagued graphics programming. If you're coming from the HTML/JS world, it is easy to learn, but if you're coming from the traditional graphics programming world, it's a major paradigm shift. Regardless, it's much easier to learn than CSS/HTML/JS. It's a clean break from the legacy concepts which plague other graphics programming environments.
The biggest strength of WPF is that it's resolution independent. It can scale across devices with little to no modifications. It requires little work to take a screen version of a drawing and output it to a high resolution printer without resolution loss.
It also supports event triggering. UI elements can respond to events of other UI elements or to your applications code, making dynamic interfaces possible. It makes it easy to separate your code from the UI in a way that even HTML/JS can't achieve. Elements can broadcast and listen to events and respond accordingly.
Another strength is its highly object-oriented and declarative capable API. Using XAML, you can easily construct a working interface quickly and efficiently with a few lines. Unlike HTML/JS, it is easier to learn and its output is far more predictable and efficient. You can even program WPF completely in code, but it's generally not worth the minor performance gain. A better method is to compile your Xaml into .NET code.
In addition, the tooling available for WPF is very extensive compared to JavaFX. There are tons of tools including Expression Blend available. There are also numerous tools for taking vector graphics formats such as SVG and Adobe Illustrator and converting them into XAML. Now, designers and programmers can collaborate on desktop publishing in a way that was very difficult to do before.
In summary, WPF is so comprehensive that the Mono team opted not to port it to the Mono code base. They claimed it would take many man years to fully implement a reasonable feature set. If a Mono compatible version of WPF existed, it would make .NET the de facto cross-platform application framework. In fact, it may even supersede HTML/CSS, since it is far more powerful and easier to get your head around. Unfortunately, Microsoft didn't see a business case for a cross-platform enabled WPF. It's why SilverLight/WPF lost to HTML5/JS. Thanks to this mistake, they are now forced to hand over not only the web but part of their desktop to HTML 5/JS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With