【问题标题】:Windows Forms Host + System.Windows.Forms.DataVisualization.ChartWindows 窗体主机 + System.Windows.Forms.DataVisualization.Chart
【发布时间】:2010-05-18 13:18:00
【问题描述】:

大家好

我有以下问题:

我想使用 Windows 窗体中的 Chart,因为它允许构建比 WPF Toolkit 中更多类型的图形可视化。

因此,我将 Windows 窗体的图表控件作为子元素添加到 WindowsFormsHost 中。但是,当我运行该应用程序时,我和我所有的客户只看到白色区域。不过,任何其他 Windows 窗体控件在 Windows 窗体主机中都能很好地工作。

图表控件有什么问题?

这是 XAML 代码

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:CHR="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"       
Title="Window1" Height="300" Width="300">
<Grid>
<wfi:WindowsFormsHost x:Name="mainFGrid" >
<CHR:Chart x:Name="mainChart" />
</wfi:WindowsFormsHost>
</Grid>
</Window>

亲切的问候,

                   Anatoliy Sova

【问题讨论】:

  • 您认为这与 .Net Framework 3.5 sp1 有关吗?如果您找到任何解决方案,请告诉我!

标签: wpf charts


【解决方案1】:

我找到了一种解决方法,基本上是在运行时创建图表

http://support2.dundas.com/Default.aspx?article=1331

谢谢

谢克

【讨论】:

  • 谢谢谢克。工作一种享受。它伸展和一切!
猜你喜欢
  • 2010-10-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-12-30
  • 2015-12-01
  • 2011-10-29
  • 1970-01-01
  • 2012-02-05
相关资源
最近更新 更多