[英]Cannot find Dockpanel in Visual Studio 2012
I installed VS2012 and wanted to create a Silverlight application using dockpanels. 我安装了VS2012,并希望使用扩展面板创建Silverlight应用程序。 I have read "somewhere" that the dockpanel component must be separately installed but I cannot find the instructions anymore using Google.
我已经读过“某处”,必须单独安装底座面板组件,但是我再也找不到使用Google的说明了。 MAybe someone from stackexchange community can help and point me to the place where I can find how to add the dockpanel componenet to VS2012.
也许来自stackexchange社区的人可以提供帮助并指向我,在那里我可以找到如何将dockpanel组件添加到VS2012。 Many thanks
非常感谢
Download the Silverlight 4 Toolkit. 下载Silverlight 4工具包。 Install it.
安装它。 (Yes, this will work with Silverlight 5 beta)
(是的,这将适用于Silverlight 5 Beta)
Add a reference to "System.Windows.Controls.Toolkit". 添加对“ System.Windows.Controls.Toolkit”的引用。 In Silverlight 5, you will need to navigate to the file:
%ProgramFiles%\\Microsoft SDKs\\Silverlight\\v4.0\\Toolkit\\Apr10\\Bin\\System.Windows.Controls.Toolkit.dll
在Silverlight 5中,您将需要导航到以下文件:
%ProgramFiles%\\Microsoft SDKs\\Silverlight\\v4.0\\Toolkit\\Apr10\\Bin\\System.Windows.Controls.Toolkit.dll
Add the following attribute to your UserControl: xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
将以下属性添加到您的UserControl:
xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
<UserControl x:Class="Project1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<tk:DockPanel>
</tk:DockPanel>
</Grid>
</UserControl>
Source: missing-dockpanel-add-dockpanel-for-silverlight-4-or-silverlight-5 资料来源: Missing-Dockpanel-添加-Silverlight-4-or-Silverlight-5
In the meantime I found the answer inspired by this link http://procbits.com/2011/07/19/missing-dockpanel-add-dockpanel-for-silverlight-4-or-silverlight-5 . 同时,我找到了受此链接启发的答案http://procbits.com/2011/07/19/missing-dockpanel-add-dockpanel-for-silverlight-4-or-silverlight-5 。 You have to install the Silverlight Toolkit 5 which can be downloaded from here: http://silverlight.codeplex.com/releases/view/78435
您必须安装可从此处下载的Silverlight Toolkit 5: http : //silverlight.codeplex.com/releases/view/78435
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.