IdanB-Forsight
Topic Author
Posts: 12
Joined: 02 Apr 2024, 16:23

StoryBoard animation on Y to some height (via data binding)

04 Jun 2025, 14:20

Hi,

currently we're using the following XAML to describe some Y animation on screen:
<Storyboard x:Key="UpDownStoryboard">
            <DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)"
                             To="0" Duration="0:0:1"
                             From="{Binding ActualHeight, ElementName=FirstMessageSection, Converter={StaticResource HeightToByConverter}, ConverterParameter=-2}"/>
        </Storyboard>
While it does seem to work, according to logger we get:
[NOESIS/E] /OverlayXaml_MessagesScreen;component/AssistantScreen.xaml(16,5): Can't Freeze BeginStoryboard.Storyboard

Is there any option to make this XAML only, or am i forced to use code-behind ?
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: StoryBoard animation on Y to some height (via data binding)

10 Jun 2025, 10:45

I guess you're defining this storyboard in the resources of a template, which get sealed when applied and then freezes its resources. This is done because those resources will be shared between all instances of the template, so they cannot contain any binding as it won't make sense.

Try defining the storyboard inside the template elements, so the storyboard (with its bindings) is cloned for each instance of the template.

Let me know if that works for you.

Who is online

Users browsing this forum: No registered users and 2 guests