Unable to use DockPanel within Silverlight project C#
I am currently trying to resize a Telerik graph by placing it within a DockPanel because the Y axis label text keeps getting clipped when the graph is resized using "this.RadChart1.DefaultView.ChartArea.Height" in hope that this formatting error will be corrected.
The problem I am currently experiencing wi开发者_开发问答th the "DockPanel" is that when I have added the required reference to my silverlight project and completed the declaration within the xaml document I am still unable to access the "DockPanel".
Please refer to my code below..
xmlns:control="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
Width="700" Height="400"
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">
<toolkit:DockPanel x:Name="LayoutRoot">
</toolkit:DockPanel>
With the error message of: The type or namespace name 'DockPanel' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference?)
The requested namespace has been installed and re-installed with still no luck.
Any ideas? :)
I think you are referencing the wrong assembly. It should be:
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
精彩评论