无法在 Silverlight 项目 C# 中使用 DockPanel
我目前正在尝试通过将 Telerik 图表放置在 DockPanel 中来调整其大小,因为当使用“this.RadChart1.DefaultView.ChartArea.Height”调整图表大小时,Y 轴标签文本不断被剪切,希望能够纠正此格式错误。
我目前在使用“DockPanel”时遇到的问题是,当我添加了对 silverlight 项目所需的引用并完成了 xaml 文档中的声明时,我仍然无法访问“DockPanel”。
请参阅下面的我的代码..
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>
错误消息为: 类型或命名空间名称“DockPanel”在命名空间“System.Windows.Controls”中不存在(您是否缺少程序集引用?)
请求的命名空间已安装并重新安装,但仍然没有成功。
有什么想法吗? :)
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 with 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? :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您引用了错误的程序集。应该是:
xmlns:toolkit="clr-namespace:System.Windows.Controls; assembly=System.Windows.Controls.工具包"
I think you are referencing the wrong assembly. It should be:
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"