rControl中使用NavigateToScreenActio

rControl中使用NavigateToScreenActio

本文介绍了是否可以在UserControl中使用NavigateToScreenAction?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在UserControl中使用NavigateToScreenAction无济于事。

Attempted to use NavigateToScreenAction from within a UserControl to no avail.

即。 - 一个UserControl,里面有一个按钮,其中包含以下内容:

i.e. - a UserControl with a button inside of it that contains the following:

            < i:Interaction.Triggers>

    &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; < i:EventTrigger EventName =" MouseLeftButtonDown">

    &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; < pi:NavigateToScreenAction TargetScreen =" SilverlightPrototype5Screens.Screen2" />

    &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; < / i:EventTrigger>

    &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; < / i:Interaction.Triggers>

            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseLeftButtonDown">
                    <pi:NavigateToScreenAction TargetScreen="SilverlightPrototype5Screens.Screen2"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>

当UserControl置于Screen1中时,该按钮不起作用,虽然我可以在单击整个组件时使用NavigateToScreenAction。

When the UserControl is placed within Screen1, the button does not work, albeit I can use a NavigateToScreenAction when clicking on the entire component.

提示?

推荐答案

如果你还没有尝试过,那么组件就会出现在SketchFlow地图创建这样的用户控件,以便在多个屏幕中重复使用,并在SketchFlow中提供更好的支持,例如右键单击元素并选择"导航到 - >"。
这将设置相同的行为,但使用Click事件。

If you haven't tried it, the components feature in the SketchFlow map creates user controls like this for re-use in multiple screens, and has better support within SketchFlow, such as the ability to right click elements and select "Navigate to ->". This would set up that same behavior, but with the Click event.


这篇关于是否可以在UserControl中使用NavigateToScreenAction?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 12:44