Silverlight是否可以去掉ChildWindow动画?

发布于 2024-11-28 10:15:30 字数 42 浏览 3 评论 0原文

在我看来,动画太长而且太“跳跃”——我想删除它或者让它更微妙。可能的?

In my opinion, the animation is too long and too "jumpy" - I'd like to remove it or make it more subtle. Possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

关于从前 2024-12-05 10:15:31

我认为你必须重新模板化 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.

听你说爱我 2024-12-05 10:15:31

这是完整的秘诀:

  1. 提取子窗口模板。我喜欢使用 Blend 来实现此目的:创建一个与目标项目类型相同的空项目,将子窗口直接放置到主页上。选择编辑模板 -> 编辑副本... Blend 为子窗口创建样式。

  2. 在您的目标项目中,添加新的“Silverlight 资源字典”。将其命名为“ChildWindowResources”。将整个样式从 Blend 项目复制到 ChildWindowResources.xaml。从复制的样式中删除“x:Key="ChildWindowStyle1”。

  3. 在目标的项目 App.xaml 中,添加“ResourceDictionary”部分,如下所示:

-

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary 
Source="/MyApp;component/ChildWindowResources.xaml"/>                
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>

现在您可以编辑模板并注释掉 VisualState x:Name="Open" 和 VisualState x:Name="Closed" 下这些讨厌的动画部分

Here's the full recipe:

  1. 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.

  2. 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.

  3. In your target's project App.xaml, add the "ResourceDictionary" section thet looks like this:

-

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary 
Source="/MyApp;component/ChildWindowResources.xaml"/>                
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>

Now you can edit the template and comment out these pesky animation sections under VisualState x:Name="Open" and VisualState x:Name="Closed"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文