Reputation: 958
I installed VS2012 and wanted to create a Silverlight application using dockpanels. I have read "somewhere" that the dockpanel component must be separately installed but I cannot find the instructions anymore using 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. Many thanks
Upvotes: 0
Views: 2410
Reputation: 10153
Download the Silverlight 4 Toolkit. Install it. (Yes, this will work with Silverlight 5 beta)
Add a reference to "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
Add the following attribute to your 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
Upvotes: 3
Reputation: 958
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 . You have to install the Silverlight Toolkit 5 which can be downloaded from here: http://silverlight.codeplex.com/releases/view/78435
Upvotes: 1