开发者

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.

Is WPF still relevant and can I use it in my C# 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜