0

The ActualWidth of StretchingGrid is always 0. I tried a lot of solutions i found here (UpdateLayout(),....), but none of them worked for me.

<Grid x:Name="StretchingGrid" HorizontalAlignment="Stretch" Background="Red">
         <Grid x:Name="GridMenu" HorizontalAlignment="Left" Background="LightBlue" Width="30">

         </Grid>
    </Grid>


    <Storyboard x:Key="OpenMenu">
         <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
                            <EasingDoubleKeyFrame KeyTime="0" Value="30"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="{Binding ActualWidth, ElementName=StretchingGrid}"/>
         </DoubleAnimationUsingKeyFrames>
    </Storyboard>

0 Answers0