简体   繁体   中英

Is WPF still relevant and can I use it in my C# windows application?

I have a process which I break into multiple processes and even when using threading it takes a very long time to complete.

I'd like to give the user an indication of the status of the execution in a cute way (for each process % complete). Maybe betting on the right horse will ease the pain :)

I found this project long ago: A Guided Tour of WPF (XAML)

I have two questions:

  1. This article was written in 2007. Is there better way to achieve this graphic effect?
  2. I have not understood yet, how the application is started, so I'd like to know if I can integrate such "window" in my window application?

Adam Robinson pointed out that the second question is not clear: The application generates a window as in the picture below - I like to know if it possible to insert it in my "normal" windows application.

替代文字

  • This article was written in 2007, is there better way to achieve this graphic effect?

WPF is the current "best" (or at least most feature-rich) way to develop a Windows Application for the desktop.

  • I have not understood yet, how the application is started, so I'd like to know if I can integrate such "window" in my window application?

Make your application a WPF Application. This will automatically give you an application, Window class, and everything else you need to get started. Making a WPF application is just like any other application, except that you need to start the message pump, create the application, setup your startup window, etc. The "WPF Application" template in Visual Studio does all of that for you...

Until you understand what all is happening, I'd recommend starting with that, and customizing from there.

If you choose to stick with a win form for the main app, you can still host the desired window/control via an ElementHostControl. (hosts wpf inside winform).

Blessings, Jeff

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM