ItemViewModeView.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <localView:UserControlBase x:Class="VocabManager.View.ItemViewModeView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:localView="clr-namespace:VocabManager.View"
  8. mc:Ignorable="d"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. d:DesignHeight="480" d:DesignWidth="480">
  13. <Grid x:Name="LayoutRoot" Hold="LayoutRoot_Hold">
  14. <toolkit:GestureService.GestureListener>
  15. <toolkit:GestureListener Flick="OnFlick"/>
  16. </toolkit:GestureService.GestureListener>
  17. <Grid.Resources>
  18. <localView:StringToVisibilityConverter x:Key="visibilityConverter"></localView:StringToVisibilityConverter>
  19. </Grid.Resources>
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="*"></RowDefinition>
  22. <RowDefinition Height="Auto"></RowDefinition>
  23. </Grid.RowDefinitions>
  24. <Grid Name="bdFront">
  25. <Grid.RowDefinitions>
  26. <RowDefinition Height="auto"></RowDefinition>
  27. <RowDefinition></RowDefinition>
  28. </Grid.RowDefinitions>
  29. <ContentControl FontSize="15" Foreground="#FFE7FD1E" Padding="5" Content="Front" Style="{StaticResource TitleStyle}" ></ContentControl>
  30. <ContentControl
  31. Grid.Row="1" Style="{StaticResource Body}" Content="{Binding Path=FrontText}"></ContentControl>
  32. <Border Grid.Row="1" Margin="5" HorizontalAlignment="Center" VerticalAlignment="Top" >
  33. <Grid>
  34. <TextBlock Text="{Binding Index}" FontSize="25" VerticalAlignment="Center" HorizontalAlignment="Center"
  35. Foreground="LightGray" FontWeight="Bold"
  36. ></TextBlock>
  37. <Ellipse StrokeThickness="3" Height="50" Width="50" Stroke="Blue"> </Ellipse>
  38. </Grid>
  39. </Border>
  40. </Grid>
  41. <Grid Name="bdBack">
  42. <Grid.RowDefinitions>
  43. <RowDefinition Height="*"></RowDefinition>
  44. <RowDefinition Height="auto"></RowDefinition>
  45. <RowDefinition Height="3*"></RowDefinition>
  46. </Grid.RowDefinitions>
  47. <Grid >
  48. <Grid.RowDefinitions>
  49. <RowDefinition Height="auto"></RowDefinition>
  50. <RowDefinition></RowDefinition>
  51. </Grid.RowDefinitions>
  52. <ContentControl Style="{StaticResource TitleStyle}" FontSize="15" Padding="5" Content="Front" ></ContentControl>
  53. <ContentControl FontSize="20" Foreground="Black" HorizontalContentAlignment="Center"
  54. Grid.Row="1" Style="{StaticResource Body}" Content="{Binding Path=FrontText}"></ContentControl>
  55. </Grid>
  56. <Grid Grid.Row="1" >
  57. <ContentControl Style="{StaticResource TitleStyle}" FontSize="20" Padding="5" Content="Back" ></ContentControl>
  58. <Button Padding="7" Content="Play" Name="btnPlay" Click="btnPlay_Click"
  59. Visibility="{Binding Path=BackSound,Converter={StaticResource visibilityConverter}}" HorizontalAlignment="Left" Foreground="White" FontSize="30" Margin="5"></Button>
  60. </Grid>
  61. <ContentControl
  62. Foreground="White" FontSize="40" Grid.Row="2" Style="{StaticResource Body}" Content="{Binding Path=BackText}"></ContentControl>
  63. </Grid>
  64. <Border Grid.Row="2" BorderBrush="Black" BorderThickness="1" Background="Black" Opacity="1" >
  65. <Button Padding="10" Foreground="White" Margin="12" Grid.Row="2" Command="{Binding ChangeSideCommand}" Content="Turn Card" ></Button>
  66. </Border>
  67. </Grid>
  68. <localView:UserControlBase.Projection>
  69. <PlaneProjection x:Name="planeProjection"
  70. CenterOfRotationX="0" />
  71. </localView:UserControlBase.Projection>
  72. <localView:UserControlBase.Triggers>
  73. <!--<EventTrigger>
  74. <BeginStoryboard>
  75. <Storyboard>
  76. <DoubleAnimation Storyboard.TargetName="LayoutRoot"
  77. Storyboard.TargetProperty="Opacity"
  78. From=".5" To="1" Duration="0:0:1" />
  79. </Storyboard>
  80. </BeginStoryboard>
  81. </EventTrigger>-->
  82. <EventTrigger>
  83. <BeginStoryboard>
  84. <Storyboard>
  85. <DoubleAnimation Storyboard.TargetName="planeProjection"
  86. Storyboard.TargetProperty="RotationY"
  87. From="200" To="0" Duration="0:0:0.5" />
  88. </Storyboard>
  89. </BeginStoryboard>
  90. </EventTrigger>
  91. </localView:UserControlBase.Triggers>
  92. </localView:UserControlBase>