当前位置: 代码迷 >> Silverlight >> 一个“BusyIndicator”挑动的“血案”
  详细解决方案

一个“BusyIndicator”挑动的“血案”

热度:6264   发布时间:2013-02-26 00:00:00.0
一个“BusyIndicator”引发的“血案”
“BusyIndicator”引发了一个错误,很奇怪啊。

      [img=http://social.msdn.microsoft.com/Forums/getfile/187141][/img]


完整XAML代码:    

                
<controls:ChildWindow x:Class="MyCharts.MeterListChartWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           Width="900" Height="300"  
           >

    <Grid x:Name="LayoutRoot" Margin="2">
<toolkit:BusyIndicator Name="bi_Busy" BusyContent="数据加载中,请稍后。。。">
            <Grid></Grid>
        </toolkit:BusyIndicator>

    </Grid>

</controls:ChildWindow>错误 1 [Control_TargetTypeMismatch]
参数: 
调试资源字符串不可用。键和参数通常会提供足够的信息来诊断问题。

请参见 http://go.microsoft.com/fwlink/?linkid=106663&Version=5.1.10411.0&File=System.Windows.dll&Key=Control_TargetTypeMismatch
C:\Users\Administrator\Desktop\Tj2.0\MyCharts\MeterListChartWindow.xaml
12 9
MyCharts




问题:大师,只是放了一个“BusyIndicator”,怎么会这个样呢???    这是什么错误,应该如何解决。



后台代码:

namespace MyCharts
{
    public partial class MeterListChartWindow : ChildWindow
    {
       

        public MeterListChartWindow(string title,string tag)
        {
            InitializeComponent();     
        }
       
    }
}

------解决方案--------------------------------------------------------
你那个根本就不可以引用
------解决方案--------------------------------------------------------
把BusyIndicator中的grid去掉
------解决方案--------------------------------------------------------
引用:
把BusyIndicator中的grid去掉

貌似不是这个问题。
------解决方案--------------------------------------------------------
你的项目引用了
System.Windows.Controls.Toolkit.dll
这个dll  吗 
------解决方案--------------------------------------------------------
在其他电脑上运行此程序会出现这个问题么?如果不出现的话那么多半是机器安装的开发工具问题。