2010-05-18 78 views
1

好日子所有Windows窗体主机+ System.Windows.Forms.DataVisualization.Chart

我有以下问题:

我想用图表从由于它允许Windows窗体构建WPF工具包所提供的更多类型的图形可视化。

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

Chart控件有什么问题?

这里是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 
+0

您是否认为这与.NET Framework 3.5 SP1有关?请让我知道,如果你找到任何解决方案! – Shaik 2010-06-04 13:21:31

回答