Changing the Busy indicator control

May 4, 2012 at 7:36 AM

Hi christian,

                I have your Graphing component in one my demonstrations and would like to change the loading template ( Busy indicator) from default to that of Silverlight Toolkit Busy Indicator. I did the below but generates error that Content is not allowed.

 

<graph:SpringGraph x:Name="walletGraph" ClipToBounds="True" NodeTemplate="{StaticResource CustomTemplate}" >
     <graphControls:LoadingControl>
        <toolkit:HeaderedContentControl>
             <toolkit:BusyIndicator IsBusy="True" DisplayAfter="0">
                   <ContentControl Content="I am busy"></ContentControl>
             </toolkit:BusyIndicator>
       </toolkit:HeaderedContentControl>
      </graphControls:LoadingControl>
</graph:SpringGraph>

May 4, 2012 at 11:15 AM

Hi deeptechtons,

Could you try to remove the HeaderedContentControl?

 

<graph:SpringGraph x:Name="walletGraph" ClipToBounds="True" NodeTemplate="{StaticResource CustomTemplate}" >
     <graphControls:LoadingControl>
        <toolkit:BusyIndicator IsBusy="True" DisplayAfter="0">
                   <ContentControl Content="I am busy">    </ContentControl>
        </toolkit:BusyIndicator>
      </graphControls:LoadingControl>
</graph:SpringGraph>

May 4, 2012 at 11:45 AM
Edited May 4, 2012 at 11:47 AM

Christian sorry that was a typo. But i wanna ask you did the code supplied by you work ? because it didn't for me. Can i override the default loading animation using BusyIndicator from the toolkit ? actual error i get is this 

The type 'LoadingControl' does not support direct content

Jul 22, 2013 at 2:35 PM
Did you already fixed this ?
The road i'm heading now is creating a style which equals the Toolkit:BusyIndicator
Jul 22, 2013 at 4:08 PM
@depptechtons

I ended up with the folowing style template:
<Style TargetType="SprngGraphControls:LoadingControl">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="SprngGraphControls:LoadingControl">
                        <toolkit:BusyIndicator x:Name="SpringBusyIndicator"
                                                BusyContent="Generating model..."
                                                IsBusy="True"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
This display;s the Silverlight Toolkit BusyIndicator, instead of the "default" SpringGraph busy control. If you want to completly customize the busy indicator, you can create your own template