2011-03-26 122 views
5

我下載 http://silverlight.net/learn/videos/silverlight-videos/twitter-search-monitor/#video不工作MSDN示例代碼:BusyIndi​​cator控件未發現

Visual Studio 2010中的源代碼,它轉化爲SL4。當運行它抱怨

Error 3 The type or namespace name 'BusyIndicator' does not exist in the 

命名空間 'System.Windows.Controls' (是否缺少程序集 引用嗎?)C:\ tutorials_dotnet \ Silverlight的\ HDI-Silverlight的源TwitterSearchApp_CS \ TwitterSearchMonitor \ OBJ \調試\查看\ Search.g.cs 38 42 TwitterSearchMonitor

回答

9

BusyIndicator沒有在Silverlight的SDK中發現,它在您需要下載並安裝Toolkit

一旦安裝,請添加對dll的引用。

這個命名空間別名添加到頁面使用BusyIndi​​cator控件: -

xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 

然後,您使用的工具包:別名來定義它: -

<toolkit:BusyIndicator x:Name="busyIndicator> 
    <!-- your page content --> 
</toolkit:BusyIndicator> 
相關問題