的Windows Phone 8.1的Silverlight和XAML [英] Windows Phone 8.1 Silverlight and XAML
问题描述
有什么办法,我可以添加XAML控制,以我的WP 8.1 Silverlight应用程序?我想使用进度环和拨动开关但它似乎是Silverlight不有他们。如何添加呢?
添加一个使用Windows.UI.Xaml.Controls引用不的方式工作。
Windows.UI.Xaml.Controls是的Windows Phone 8.1运行时只(或更好地称为通用应用程序)。如果你不Silverlight中喜欢控制已经,微软已经发布了扩展控制套件所有的Windows Phone工具包。 >管理的NuGet软件包 - - 可以使用的NuGet通过右键点击它引用获得。>搜索工具包,并选择一个由微软
命名空间添加到您的XAML,你准备好去。
<预类=郎XAML prettyprint-覆盖>
<电话:XMLNS的PhoneApplicationPage:工具=CLR的命名空间:Microsoft.Phone.Controls ;装配= Microsoft.Phone.Controls.Toolkit>
的在Windows Phone工具包的CodePlex项目页面
在工具箱中的所有工具包控制的名单
Is there any way I can add XAML controls to my WP 8.1 Silverlight app? I'd like to use progress rings and toggle switches but it seems like Silverlight doesn't have them. How can I add them?
Adding a "using Windows.UI.Xaml.Controls" reference doesn't work by the way.
Windows.UI.Xaml.Controls is Windows Phone 8.1 Runtime only (or better known as Universal App). If you don't like the controls already in Silverlight, Microsoft has release a extended control kit all "Windows Phone Toolkit". You can get it using NuGet by right clicking the References -> Manage NuGet Packages -> Search "Toolkit" and select the one by Microsoft.
Add the namespace to your XAML and you're ready to go.
<phone:PhoneApplicationPage xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">
The Windows Phone Toolkit's CodePlex Project Page
List of All Toolkit Control's in the Toolbox
这篇关于的Windows Phone 8.1的Silverlight和XAML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!