WPF触发WebBrowser导航/导航



我的问题:
如何触发网络浏览器事件(如导航/导航),以便为整个浏览器设置动画?

我在Blend 4的触发器面板中找不到这两个操作

EventTriggers仅与RoutedEvents一起工作,这些事件不路由。

您可以处理这些事件并在代码中设置动画。


除此之外,您还可以使用Blend的交互功能:

xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
<WebBrowser>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Navigated">
            <i:EventTrigger.Actions>
                <ei:ControlStoryboardAction>
                    <ei:ControlStoryboardAction.Storyboard>
                        <!-- Storyboard here -->
                    </ei:ControlStoryboardAction.Storyboard>
                </ei:ControlStoryboardAction>
            </i:EventTrigger.Actions>
        </i:EventTrigger>
    </i:Interaction.Triggers>
</WebBrowser>

我很惊讶它们的使用没有集成到Blend的触发器编辑UI中。

最新更新