简体   繁体   English

第一行DataGrid的动画?

[英]The animation of the first row DataGrid?

Maybe someone knows the answer to my question. 也许有人知道我的问题的答案。 How to make text color of the new added row in Datagrid brighter than other rows in the first 5 seconds, and then she again became the same as all the rows? 如何在开始的5秒钟内使Datagrid中新添加的行的文本颜色比其他行更亮,然后她又变得与所有行相同? If this is done through the animation, then tell me please how? 如果通过动画完成此操作,请告诉我如何?

You can use Expression blend to create WPF animation. 您可以使用Expression blend创建WPF动画。 It ll generate Xaml code which use the StoryBoard xaml Tag. 它将生成使用StoryBoard xaml标签的Xaml代码。

You should have somthink like that code Snippet. 您应该具有类似该代码段的代码。

           <DataGrid.Triggers>
                <EventTrigger RoutedEvent="DataGrid.MouseLeave">
                    <BeginStoryboard>
                        <Storyboard>
                            <ColorAnimation To="Red" Storyboard.TargetProperty="(your new row here ???).(SolidColorBrush.Color)" Duration="0:0:10"></ColorAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </DataGrid.Triggers>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM