如何在 Windows 的 WPF 应用程序中使用 ProgressRing

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27063768/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 12:43:03  来源:igfitidea点击:

how to use ProgressRing in a WPF application for windows

wpfxamlcontrols

提问by Eux

As simple as in the title, I'd like to know how to use a ProgressRing on my gui. I can't figure out how to import the Windows.UI.Xaml.Controls namespace in which seems to be located. Thanks!

就像标题一样简单,我想知道如何在我的 gui 上使用 ProgressRing。我不知道如何导入似乎位于其中的 Windows.UI.Xaml.Controls 命名空间。谢谢!

Eugenio

欧亨尼奥

回答by ndonohoe

I don't think you can add a reference to a Windows Store Apps DLL to a WPF project, they are built against different versions of the framework.

我认为您不能向 WPF 项目添加对 Windows 应用商店应用程序 DLL 的引用,它们是针对不同版本的框架构建的。

You could however use a ProgressRing from a different WPF targeting DLL; MahApps Metro has one https://mahapps.com/docs/controls/progressring(source is on github so you can just take what is needed without having to jump fully into the metro style)

但是,您可以使用来自不同 WPF 目标 DLL 的 ProgressRing;MahApps Metro 有一个https://mahaps.com/docs/controls/progressring(源在 github 上,因此您只需获取所需的内容,而无需完全进入 Metro 风格)

Or you could implement your own following a tutorial http://henryzhu1997.wordpress.com/2013/06/18/creating-a-progressring-for-wpf/

或者您可以按照教程http://henryzhu1997.wordpress.com/2013/06/18/creating-a-progressring-for-wpf/实现自己的