PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/PrismLibrary/Silverlight/Prism.Interactivity/InteractionRequest/ConfirmationChildWindow.xaml

#
XAML | 37 lines | 34 code | 3 blank | 0 comment | 0 complexity | e0053e49632fb2eded532a4dcee2f96d MD5 | raw file
 1<controls:ChildWindow x:Class="Microsoft.Practices.Prism.Interactivity.InteractionRequest.ConfirmationChildWindow"
 2           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
 3           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
 4           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
 5           xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"  
 6           xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
 7           Width="Auto" Height="Auto" 
 8           Title="{Binding Title}"
 9           x:Name="confirmationWindow">
10
11    <Grid x:Name="LayoutRoot" Margin="2">
12        <Grid.RowDefinitions>
13            <RowDefinition />
14            <RowDefinition Height="Auto" />
15        </Grid.RowDefinitions>
16
17        <ContentControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0"
18                        ContentTemplate="{Binding ConfirmationTemplate, ElementName=confirmationWindow}"
19                        Content="{Binding Content}"/>
20
21        <Button x:Name="CancelButton" Content="Cancel" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1">
22            <i:Interaction.Triggers>
23                <i:EventTrigger EventName="Click">
24                    <ei:CallMethodAction TargetObject="{Binding ElementName=confirmationWindow}" MethodName="Close"/>
25                </i:EventTrigger>
26            </i:Interaction.Triggers>
27        </Button>
28        <Button x:Name="OKButton" Content="OK" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1">
29            <i:Interaction.Triggers>
30                <i:EventTrigger EventName="Click">
31                    <ei:ChangePropertyAction PropertyName="Confirmed" TargetObject="{Binding}" Value="True"/>
32                    <ei:CallMethodAction TargetObject="{Binding ElementName=confirmationWindow}" MethodName="Close"/>
33                </i:EventTrigger>
34            </i:Interaction.Triggers>
35        </Button>
36    </Grid>
37</controls:ChildWindow>