locked
how to use Event Triggering in Prism? RRS feed

  • Question

  • I have control which doesnt have the command option? i want to send command to viewmodel with some parameter on Loaded event of this usercontrol how i can achieve this via Prism In silverlight?

    Friday, July 15, 2011 8:30 AM

Answers

  • Hi,

    Prism trigger is old you'd better use Expression Blend Trigger.

    http://forums.silverlight.net/forums/p/230718/563523.aspx#563523

    Friday, July 15, 2011 8:50 AM
  • UP?

    <i:Interaction.Triggers>
        <prism:InteractionRequestTrigger 
                SourceObject="{Binding ConfirmCancelInteractionRequest}">
    
            <prism:PopupChildWindowAction
                      ContentTemplate="{StaticResource ConfirmWindowTemplate}"/>
    
        </prism:InteractionRequestTrigger>
    </i:Interaction.Triggers>
    
    <UserControl.Resources>
        <DataTemplate x:Key="ConfirmWindowTemplate">
            <Grid MinWidth="250" MinHeight="100">
                <TextBlock TextWrapping="Wrap" Grid.Row="0" Text="{Binding}"/>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    Thursday, July 21, 2011 1:37 AM

All replies

  • Hi,

    Prism trigger is old you'd better use Expression Blend Trigger.

    http://forums.silverlight.net/forums/p/230718/563523.aspx#563523

    Friday, July 15, 2011 8:50 AM
  • UP?

    <i:Interaction.Triggers>
        <prism:InteractionRequestTrigger 
                SourceObject="{Binding ConfirmCancelInteractionRequest}">
    
            <prism:PopupChildWindowAction
                      ContentTemplate="{StaticResource ConfirmWindowTemplate}"/>
    
        </prism:InteractionRequestTrigger>
    </i:Interaction.Triggers>
    
    <UserControl.Resources>
        <DataTemplate x:Key="ConfirmWindowTemplate">
            <Grid MinWidth="250" MinHeight="100">
                <TextBlock TextWrapping="Wrap" Grid.Row="0" Text="{Binding}"/>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>
    Thursday, July 21, 2011 1:37 AM