locked
User Control Navigation Not Working in SketchFlow Player RRS feed

  • Question

  • I am running Expression Blend 3 on Vista Ultimate 64 bit. I have built two controls and added behaviors of NavigateToScreenAction to one control and NavigationForwardAction to the other control. In SketchFlow Player the navigation does not work for either control. Here is the XMAL code generated for the control with NavigateToScreenAction.

    <UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:pb="clr-namespace:Microsoft.Expression.Prototyping.Behavior;assembly=Microsoft.Expression.Prototyping.Interactivity"
        x:Name="Screen_1_13_Name"
        x:Class="CI_comm_au_websiteScreens.Copy_of_Next_Btn"
        Width="75" Height="22">

        <Grid x:Name="LayoutRoot" Background="White">
            <Button x:Name="btnLogOut" Margin="0" VerticalAlignment="Top" Content="Log Out&#xa;">
                <Button.Background>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FFF3F3F3" Offset="0"/>
                        <GradientStop Color="#FFEBEBEB" Offset="0.257"/>
                        <GradientStop Color="#FFDDDDDD" Offset="0.253"/>
                        <GradientStop Color="#FFE1932B" Offset="0.643"/>
                    </LinearGradientBrush>
                </Button.Background>
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <pb:NavigateToScreenAction TargetScreen="Login" IsEnabled="True"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Button>
        </Grid>
    </UserControl>

    Anybody got ideas of what is causing the problem?
    Friday, July 24, 2009 8:41 PM

All replies

  • Hi,

    Do you have a sample project that you can share ??

    Does this happen on all your SketchFlow apps that use navigation behaviours ??

    thanks

    <Rich />
    Saturday, July 25, 2009 10:03 AM
  • The TargetScreen needs to be set to the namespace + classname of the screen you want to navigate to.   Not sure if you noticed, but if you right click an object on the artboard, there is a context menu item that allows you to set what an item navigates to.

    Here is an example:

    <Grid x:Name="LayoutRoot" Background="White">
    		<Button Content="Button">
    			<i:Interaction.Triggers>
    				<i:EventTrigger EventName="Click">
    					<pb:NavigateToScreenAction TargetScreen="WpfPrototype4Screens.Screen_2"/>
    				</i:EventTrigger>
    			</i:Interaction.Triggers>
    		</Button>
    	</Grid>
    Monday, July 27, 2009 12:43 PM
    Moderator