Windows Phone Toolkit overview

本文介绍了Windows Phone 8工具包的新特性,包括新的控件、效果及过渡、自定义消息框等,并提供了如何通过NuGet安装工具包的详细步骤。此外,还演示了如何使用Windows Phone Toolkit Test Framework进行单元测试。

The Toolkit team is proud to announce the release of the Windows Phone 8 version of the Windows Phone Toolkit. Here’s what’s new:

  • New toolkit download from CodePlex
  • Installation exclusively through NuGet (deprecated .msi download file)
  • Windows Phone 7 and Windows Phone 8 toolkits in a single package
  • New controls and features
  • Bug fixes

For those of you who are new to developing for Windows Phone, the Windows Phone Toolkit is an additional package of controls that you can use with the Windows Phone SDK to easily add useful controls to your Windows Phone app.

Installation and downloads

To install the Windows Phone Toolkit

  1. Download and install the latest NuGet package manager
    Note: The Windows Phone 8 Toolkit package requires NuGet version 2.1. If you have an older version of NuGet and try to install the Windows Phone toolkit, you’ll receive the following error message: “The package does not contain any assembly references that are compatible with that framework.” Restart all instances of Visual Studio after you install the latest version of NuGet.
  2. Install the Windows Phone toolkit package using the following steps:
    • In Visual Studio 2012, create a Windows Phone 8.0 or a Windows Phone OS 7.1 project.
    • From the menu bar in Visual Studio, select Tools Library Package Manager Manage NuGet Packages for Solution.
    • Select Online in the column on the left of the Manage NuGet Packages dialog box.
    • Search for the WPToolkit package, authored by Microsoft.
    • Click Install and apply the package to your project.

      Note: Alternatively, you can click Select Tools Library Package Manager Package Manager Console. In the Package Manager Console, type: 
      Install-Package WPToolkit

The installation adds a reference to Microsoft.Phone.Controls.Toolkit.dll to your project. It also creates theToolkit.Content folder, which contains resources for toolkit controls. This NuGet Windows Phone package supports Windows Phone OS7.0, Windows Phone OS 7.1, and Windows Phone OS 8.0. In addition, you can install the Windows Phone Toolkit Test Framework package to integrate unit tests for your Windows Phone apps. This NuGet package supports Windows Phone OS 7.1 and Windows Phone OS 8.0.

After you have added the Windows Phone toolkit package to your Windows Phone project, you can easily add a wide range of controls, such as the AutoCompleteBox control, the WrapPanel control, and the LongListMultiSelectorcontrol.

Control Examples

To get a better understanding of the controls provided in the Windows Phone toolkit, download the source code and samples from CodePlex. After you download the sample source code, run the Windows Phone 8 sample solution. You can look through the source to get an idea of how each control is used. Here are some of the new controls in Windows Phone 8.

MapExtensions (WP8 only) 
clip_image002

Various Effects/Transitions 
clip_image004

CustomMessageBox 
clip_image006

RatingControl 
clip_image008

LongListMultiSelector – List Layout (WP8 only)
clip_image010

LongListMultiSelector – Grid Layout (WP8 only)
clip_image012

  

ExpanderView 
clip_image014

ListPicker 
clip_image016

HubTile 
clip_image018

DatePicker 
clip_image020

TimePicker 
clip_image022

ContextMenu 
clip_image024

ToggleSwitch Control 
clip_image026

AutoCompleteBox 
clip_image028

Windows Phone Toolkit Test Framework

The following steps show how you can write a simple “hello world” unit test using the Windows Phone Toolkit Test Framework:

  1. In Visual Studio 2012, create a Windows Phone 8.0 or a Windows Phone OS 7.1 project.
  2. From the menu bar in Visual Studio, select Tools Library Package Manager Package Manager Console.
  3. In the Package Manager Console window enter the following:
    install-package WPToolkitTestFx
    The package manager will install the WPToolkit package first. Then, it will add references toMicrosoft.Phone.Toolkit.Testing.dll and Microsoft.VisualStudio.QualityTools.UnitTesting.Phone.dll. It also adds AppBar icons to the Toolkit.Content folder.
  4. At the beginning of the MainPage.xaml.cs file, add the following using statements:

    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Microsoft.Phone.Testing;

  5. Replace the MainPage class in MainPage.xaml.cs file with the following code:

    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            this.Content = UnitTestSystem.CreateTestPage();
        }
    }

    [TestClass]
    public class HelloWorldTests: WorkItemTest
    {
        [TestMethod]
        [Description("Test1: Always have description")]
        public void Test1()
        {
            Assert.IsTrue(true);
        }

        [TestMethod]
        [Asynchronous]
        [Description("Test2: Sample asynchronous test")]
        public void Test2()
        {
            // this test executes asynchronously
            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                // ... and then fails
                Assert.IsFalse(true);
                TestComplete();
            });
        }
    }
  6. Run the application in emulator mode. The Home page of the UnitTestSystem is launched.

    clip_image030
  7. Click the play button in the app bar to run the tests.
  8. In Visual Studio, press F5 to continue execution of the app.
  9. When the app returns focus to the emulator, click HelloWorldTests to see the results.

    clip_image032

For more information, see Stefan Wick’s video titled Expert Lessons: Top Tips for Building a Successful Windows Phone Application.

Reporting issues, discussions and sample requests

Use the following list to provide feedback:




from  : http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/20/windows-phone-toolkit-overview.aspx
【RIS 辅助的 THz 混合场波束斜视下的信道估计与定位】在混合场波束斜视效应下,利用太赫兹超大可重构智能表面感知用户信道与位置(Matlab代码实现)内容概要:本文围绕“IS 辅助的 THz 混合场波束斜视下的信道估计与定位”展开,重点研究在太赫兹(THz)通信系统中,由于混合近场与远场共存导致的波束斜视效应下,如何利用超大可重构智能表面(RIS)实现对用户信道状态信息和位置的联合感知与精确估计。文中提出了一种基于RIS调控的信道参数估计算法,通过优化RIS相移矩阵提升信道分辨率,并结合信号到达角(AoA)、到达时间(ToA)等信息实现高精度定位。该方法在Matlab平台上进行了仿真验证,复现了SCI一区论文的核心成果,展示了其在下一代高频通信系统中的应用潜力。; 适合人群:具备通信工程、信号处理或电子信息相关背景,熟悉Matlab仿真,从事太赫兹通信、智能反射面或无线定位方向研究的研究生、科研人员及工程师。; 使用场景及目标:① 理解太赫兹通信中混合场域波束斜视问题的成因与影响;② 掌握基于RIS的信道估计与用户定位联合实现的技术路径;③ 学习并复现高水平SCI论文中的算法设计与仿真方法,支撑学术研究或工程原型开发; 阅读建议:此资源以Matlab代码实现为核心,强调理论与实践结合,建议读者在理解波束成形、信道建模和参数估计算法的基础上,动手运行和调试代码,深入掌握RIS在高频通信感知一体化中的关键技术细节。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值