2012-07-30 107 views
-4

我的XAML代码:繁忙指示灯不工作?

<telerik:RadBusyIndicator Name="RadBusyIndicator" IsBusy="True" 
          Margin="34,32,58,36" Visibility="Collapsed" 
          Grid.Row="3" Grid.RowSpan="4" Grid.Column="2"> 
</telerik:RadBusyIndicator> 

,我有所谓的“导入” Import按钮使忙碌指标的点击按钮名称为

RadBusyIndicator.visibility=visibility.visible; 

忙指标是不可见的是我的代码是错的?

+2

你是什么意思,它不工作? – 2012-07-30 12:23:46

+0

你的代码在哪里? – 2012-07-30 12:24:07

+0

忙状态指示灯根本不可见 – nagendra 2012-07-30 12:25:00

回答

0

您是否将其IsBusy设置为true? 你也在后台线程上运行你的代码。

忙碌指示符应该包含控件,当它的IsBusy为true时将被禁用。通常制作BusyWindow的整个窗口内容。

<telerik:RadBusyIndicator Name="RadBusyIndicator" IsBusy="True" Margin="34,32,58,36" Grid.RowSpan="4" Visibility="Collapsed" Grid.Row="3" Grid.Column="2"> 

<Button Grid.Row="6" Grid.Column="2" Content="Import" Width="120" Height="30" IsEnabled="False" VerticalAlignment="Center" HorizontalAlignment="Center" Name="btnImport" Click="btnImport_Click" Margin="76,5,79,5"></Button> 

</telerik:RadBusyIndicator> 
+3

如果您要求澄清详细信息,则应将其作为评论发布,而不是回答。 – ChrisF 2012-07-30 12:28:12

+0

是的,我做了isbusy = true,并且我在后台跑步 – nagendra 2012-07-30 12:28:50

+0

有没有工作...你可以粘贴一些示例代码... – Mohit 2012-07-30 12:30:02