Windows 8 store app c# animating margin [closed]

萝らか妹 提交于 2019-12-14 01:00:26

问题


i am creating a windows store app and it needs some animation

does anyone have a working example of animating the margin of an usercontrol?

do i need to use reposition? ( doubleanimation doesn't support ucChat.margin or ucChat.margin.top)

DoubleAnimation da = new DoubleAnimation();
                da.Duration = new Duration(TimeSpan.FromMilliseconds(1500));
                da.From = 0;
                da.To = -400;

                Storyboard st = new Storyboard();
                Storyboard.SetTarget(da, ucChat);
                Storyboard.SetTargetProperty(da, "ucChat.Margin.Top");
                st.Children.Add(da);

                st.Begin();

it seems that in wpf you could use ThicknessAnimation, is there an equivalent in windows store app?

来源:https://stackoverflow.com/questions/13286274/windows-8-store-app-c-sharp-animating-margin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!