Search code examples
.netwpfxamlattached-properties

Is it possible to animate the Grid.Column?


Сan I animate Grid.Column property? I need to move <Border> in columns.

<Storyboard>
       <DoubleAnimation Storyboard.TargetProperty="Grid.Column" To="4" Duration="0:0:0.3"/>  
</Storyboard>

Solution

  • Since Grid.Column is an attached property, you must add parentheses to the property path.

    See PropertyPath for Animation Targets.

    <Int32Animation Storyboard.TargetProperty="(Grid.Column)" To="4" Duration="0:0:0.3"/>