views:

642

answers:

2

Hello, I'm struggling with Silverlights' activity control. I placed a grid inside the activity control and no matter whether it shows "Loading..." or not, the grid doesn't stretch anymore, only the min-values are applied. After removing the activity-control everything works fine, againg - but I need to use the ctrl. Did I do something wrong? Best regards, rwh

Code:
<Grid x:Name="LayoutRoot" Style="{StaticResource DetailPageLayoutRoot}">
    <activity:Activity IsActive="{Binding IsBusy}">
     <Grid ShowGridLines="True" MinWidth="200" MinHeight="200" Background="Bisque" >
      <Grid.ColumnDefinitions>
       <ColumnDefinition MinWidth="50" Width="0.2*"/>
       <ColumnDefinition Width="Auto"/>
       <ColumnDefinition MinWidth="50" Width="0.8*"/>
      </Grid.ColumnDefinitions>
      <StackPanel Grid.Column="0" Margin="1" Background="Beige">
      ...
      </StackPanel>
      <controls:GridSplitter Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Center" Margin="1" Width="4" MinWidth="4" MaxWidth="4"/>
      <StackPanel Grid.Column="2" Margin="1" Background="AliceBlue">
       ...
      </StackPanel>
     </Grid>
    </activity:Activity>
</Grid>
A: 

I am having the same problem. I think it might be something wrong with the control. You could set the minwidth/height programmatically. So innerGrid.minWidth = innerGrid.Parent.Parent.actualwidth; Not sure if that will work though.

James
Thanks, for me it doesn't work, but I worked around it by setting the minwidth and minheight properties - at the cost of losing the very nicely working screen resizing of SL.
A: 

Update:

This control has now(Nov 2009) been incorporated into the Silverlight toolkit. Its been renamed the BusyIndicator. Get it here.

Original Answer:

The latest version of the control fixes this problem. Download it here: http://www.davidpoll.com/2009/09/14/update-2-displaying-background-activity-in-a-silverlight-ria-application/

geoff
Dear Geoff, I just found the time to test your control, it works perfectly. Thank you very much!P.S.: Just one hint to others using this control: For a now unknown reason I already had an ActivityControl.dll in my libs (from September), make sure to delete this first and check the file date after creating a reference, so that you use the new one.
@rwh- I've updated the answer. The control has now been included in the Silverlight toolkit so its probably best to get it from there.
geoff