Page 1 of 1

Visibility in storyboard error

Posted: 09 Jun 2019, 11:01
by ivan_b
Hi,

In the latest noesis version I am getting this error "Can't animate property 'TextBlock.Visibility' with a ObjectAnimationUsingKeyFrames".
I am not sure this is due to some better error handling or this is a bug in the new Noesis version?
The xml part looks like this
                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PackageListText" Storyboard.TargetProperty="(UIElement.Visibility)">
                 	<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
                </ObjectAnimationUsingKeyFrames>

Re: Visibility in storyboard error

Posted: 10 Jun 2019, 12:25
by sfernandez
In previous versions of Noesis that animation will probably be ignored as the Visible value was treated as a string, and unable to set it.

You can use the following:
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PackageListText" Storyboard.TargetProperty="(UIElement.Visibility)">
    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}"/>
</ObjectAnimationUsingKeyFrames>

Re: Visibility in storyboard error

Posted: 16 Jun 2019, 12:40
by ivan_b
Thank you.

Re: Visibility in storyboard error

Posted: 17 Jun 2019, 16:31
by sfernandez
Can we mark this as solved?

Re: Visibility in storyboard error

Posted: 23 Jun 2019, 10:06
by ivan_b
Yes, you can mark this as solved :)