Silverlight是否可以去掉ChildWindow动画?
在我看来,动画太长而且太“跳跃”——我想删除它或者让它更微妙。可能的?
In my opinion, the animation is too long and too "jumpy" - I'd like to remove it or make it more subtle. Possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你必须重新模板化 ChildWindow。检查此链接以便您可以复制默认模板并对动画进行所需的更改。
I think you have to re-template the ChildWindow. Check this link so you can copy the default template and make your desired changes to the animation.
这是完整的秘诀:
提取子窗口模板。我喜欢使用 Blend 来实现此目的:创建一个与目标项目类型相同的空项目,将子窗口直接放置到主页上。选择编辑模板 -> 编辑副本... Blend 为子窗口创建样式。
在您的目标项目中,添加新的“Silverlight 资源字典”。将其命名为“ChildWindowResources”。将整个样式从 Blend 项目复制到 ChildWindowResources.xaml。从复制的样式中删除“x:Key="ChildWindowStyle1”。
在目标的项目 App.xaml 中,添加“ResourceDictionary”部分,如下所示:
-
现在您可以编辑模板并注释掉 VisualState x:Name="Open" 和 VisualState x:Name="Closed" 下这些讨厌的动画部分
Here's the full recipe:
Extract the Child Window Template. I like to use Blend for this: create an empty project of the same type as your target project, put a child window directly to the main page. Select Edit Template->Edit a copy... Blend creates a style for the ChildWindow.
In your target project, add a new "Silverlight Resource Dictionary". name it "ChildWindowResources". Copy the entire style from the Blend project to the ChildWindowResources.xaml. Remove the "x:Key="ChildWindowStyle1" from the copied style.
In your target's project App.xaml, add the "ResourceDictionary" section thet looks like this:
-
Now you can edit the template and comment out these pesky animation sections under VisualState x:Name="Open" and VisualState x:Name="Closed"