MSDN示例代码不起作用:未找到BusyIndi​​cator

use*_*291 5 silverlight

我下载了http://silverlight.net/learn/videos/silverlight-videos/twitter-search-monitor/#video的源代码

Visual Studio 2010将其转换为SL4.在运行它时抱怨

Error 3   The type or namespace name 'BusyIndicator' does not exist in the
Run Code Online (Sandbox Code Playgroud)

namespace'System.Windows.Controls'(你错过了程序集引用吗?)C:\ tutorials_dotnet\silverlight\HDI-Silverlight-source-TwitterSearchApp_CS\TwitterSearchMonitor\obj\Debug\Views\Search.g.cs 38 42 TwitterSearchMonitor

Ant*_*nes 9

BusyIndicator不是在Silverlight的SDK中发现,其在工具包,你需要下载和安装.

安装后添加对System.Windows.Controls.Toolkitdll 的引用.

使用BusyIndi​​cator将此命名空间别名添加到页面: -

xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
Run Code Online (Sandbox Code Playgroud)

然后使用工具箱:别名来定义它: -

<toolkit:BusyIndicator x:Name="busyIndicator>
    <!-- your page content -->
</toolkit:BusyIndicator>
Run Code Online (Sandbox Code Playgroud)