PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/StockTrader RI/Silverlight/StockTraderRI/Shell.xaml

#
XAML | 216 lines | 201 code | 10 blank | 5 comment | 0 complexity | 1c06758e9ba25f709a60ea1e3478e9cd MD5 | raw file
  1. <UserControl x:Class="StockTraderRI.Shell"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:Regions="http://www.codeplex.com/prism"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
  7. xmlns:Controls="clr-namespace:StockTraderRI.Controls"
  8. HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
  9. xmlns:infBehaviors="clr-namespace:StockTraderRI.Infrastructure.Behaviors;assembly=StockTraderRI.Infrastructure"
  10. infBehaviors:RegionPopupBehaviors.CreatePopupRegionWithName="SecondaryRegion"
  11. infBehaviors:RegionPopupBehaviors.ContainerWindowStyle="{StaticResource PopupStyle}">
  12. <UserControl.Resources>
  13. <Storyboard x:Key="InTransition">
  14. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Logo" Storyboard.TargetProperty="(UIElement.Opacity)">
  15. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  16. <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
  17. <SplineDoubleKeyFrame KeyTime="00:00:02.5000000" Value="1"/>
  18. </DoubleAnimationUsingKeyFrames>
  19. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
  20. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  21. <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0"/>
  22. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="1"/>
  23. </DoubleAnimationUsingKeyFrames>
  24. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
  25. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-72"/>
  26. <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-157"/>
  27. <SplineDoubleKeyFrame KeySpline="0.5,0,0.5,1" KeyTime="00:00:01.5000000" Value="0"/>
  28. </DoubleAnimationUsingKeyFrames>
  29. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Logo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
  30. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-50"/>
  31. <SplineDoubleKeyFrame KeyTime="00:00:02" Value="-101"/>
  32. <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:02.5000000" Value="0"/>
  33. </DoubleAnimationUsingKeyFrames>
  34. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SideGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
  35. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  36. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
  37. <SplineDoubleKeyFrame KeyTime="00:00:02" Value="1" KeySpline="0,0.5,0.5,1"/>
  38. <SplineDoubleKeyFrame KeyTime="00:00:02.5000000" Value="1"/>
  39. </DoubleAnimationUsingKeyFrames>
  40. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SideGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
  41. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="400"/>
  42. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="400"/>
  43. <SplineDoubleKeyFrame KeySpline="0,1,0.5,1" KeyTime="00:00:02" Value="0"/>
  44. <SplineDoubleKeyFrame KeyTime="00:00:02.5000000" Value="0"/>
  45. </DoubleAnimationUsingKeyFrames>
  46. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MainToolbar" Storyboard.TargetProperty="(UIElement.Opacity)">
  47. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  48. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
  49. <SplineDoubleKeyFrame KeyTime="00:00:02" Value="1"/>
  50. </DoubleAnimationUsingKeyFrames>
  51. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
  52. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.20833317935466766"/>
  53. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0.05"/>
  54. <SplineDoubleKeyFrame KeySpline="0,0.495999991893768,0.504000008106232,1" KeyTime="00:00:02" Value="0.05"/>
  55. <SplineDoubleKeyFrame KeySpline="0,0.500999987125397,0.504000008106232,1" KeyTime="00:00:02.5000000" Value="1"/>
  56. </DoubleAnimationUsingKeyFrames>
  57. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DetailsGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
  58. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
  59. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
  60. <SplineDoubleKeyFrame KeySpline="0,0.495999991893768,0.504000008106232,1" KeyTime="00:00:02" Value="1"/>
  61. <SplineDoubleKeyFrame KeySpline="0,0.500999987125397,0.504000008106232,1" KeyTime="00:00:02.5000000" Value="1"/>
  62. </DoubleAnimationUsingKeyFrames>
  63. <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SideGrid" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
  64. <SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,0"/>
  65. <SplinePointKeyFrame KeyTime="00:00:01.5000000" Value="0.5,0"/>
  66. <SplinePointKeyFrame KeyTime="00:00:02" Value="0.5,0"/>
  67. <SplinePointKeyFrame KeyTime="00:00:02.5000000" Value="0.5,0"/>
  68. </PointAnimationUsingKeyFrames>
  69. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SideGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
  70. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="304.47500610351562"/>
  71. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0"/>
  72. <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
  73. <SplineDoubleKeyFrame KeyTime="00:00:02.5000000" Value="0"/>
  74. </DoubleAnimationUsingKeyFrames>
  75. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MainToolbar" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
  76. <SplineDoubleKeyFrame KeyTime="00:00:00" Value="100"/>
  77. <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="100"/>
  78. <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0" KeySpline="0,0.495999991893768,0.504000008106232,1"/>
  79. </DoubleAnimationUsingKeyFrames>
  80. </Storyboard>
  81. </UserControl.Resources>
  82. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Top">
  83. <Image Source="Resources/background.png" Stretch="UniformToFill" />
  84. <Grid Grid.Row="1" RenderTransformOrigin="0.5,0.5" Margin="30,0,30,20">
  85. <Grid.RenderTransform>
  86. <TransformGroup>
  87. <ScaleTransform/>
  88. <SkewTransform/>
  89. <RotateTransform/>
  90. <TranslateTransform/>
  91. </TransformGroup>
  92. </Grid.RenderTransform>
  93. <Grid.RowDefinitions>
  94. <RowDefinition Height="124"/>
  95. <RowDefinition Height="4*"/>
  96. <RowDefinition x:Name="ActionRow" Height="5*"/>
  97. </Grid.RowDefinitions>
  98. <Grid.ColumnDefinitions>
  99. <ColumnDefinition Width="*" MinWidth="400" />
  100. <ColumnDefinition Width="Auto" />
  101. </Grid.ColumnDefinitions>
  102. <!-- logo -->
  103. <Canvas x:Name="Logo" Grid.ColumnSpan="2" RenderTransformOrigin="0.5,0.5">
  104. <Canvas.RenderTransform>
  105. <TransformGroup>
  106. <ScaleTransform/>
  107. <SkewTransform/>
  108. <RotateTransform/>
  109. <TranslateTransform/>
  110. </TransformGroup>
  111. </Canvas.RenderTransform>
  112. <TextBlock Text="CFI " TextWrapping="NoWrap" Foreground="#FFC4CFD6" FontSize="72" Opacity="0.85" Canvas.Left="0" Canvas.Top="5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="80" Width="135" TextAlignment="Left" FontWeight="Bold" />
  113. <TextBlock Text="STOCKTRADER" TextWrapping="NoWrap" Foreground="#FFC4CFD6" FontSize="72" Opacity="0.85" Height="80" TextAlignment="Left" FontWeight="Normal" Width="525" Canvas.Left="150" Canvas.Top="5"/>
  114. </Canvas>
  115. <!-- main bar -->
  116. <ItemsControl x:Name="MainToolbar" Regions:RegionManager.RegionName="MainToolBarRegion" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,10,0" Grid.Row="1" RenderTransformOrigin="0.5,0.5">
  117. <ItemsControl.RenderTransform>
  118. <TransformGroup>
  119. <ScaleTransform/>
  120. <SkewTransform/>
  121. <RotateTransform/>
  122. <TranslateTransform/>
  123. </TransformGroup>
  124. </ItemsControl.RenderTransform>
  125. <ItemsControl.ItemsPanel>
  126. <ItemsPanelTemplate>
  127. <StackPanel Orientation="Horizontal" />
  128. </ItemsPanelTemplate>
  129. </ItemsControl.ItemsPanel>
  130. </ItemsControl>
  131. <!-- content -->
  132. <Grid x:Name="ContentGrid" Grid.Row="1" Margin="10,0,10,10" RenderTransformOrigin="0.5,0.5">
  133. <Grid.RenderTransform>
  134. <TransformGroup>
  135. <ScaleTransform/>
  136. <SkewTransform/>
  137. <RotateTransform/>
  138. <TranslateTransform/>
  139. </TransformGroup>
  140. </Grid.RenderTransform>
  141. <Controls:AnimatedTabControl Regions:RegionManager.RegionName="MainRegion" Opacity="1"
  142. HorizontalAlignment="Stretch" Background="{StaticResource BorderBackground}"
  143. BorderBrush="{x:Null}"
  144. Regions:TabControlRegionAdapter.ItemContainerStyle="{StaticResource CustomTabItemStyle}"
  145. VerticalAlignment="Stretch" Padding="10,10,10,10" AutomationProperties.AutomationId="PositionSummaryTab" />
  146. </Grid>
  147. <!-- sidebar -->
  148. <Grid x:Name="SideGrid" Margin="10,29,10,10" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" RenderTransformOrigin="0.5,0.5" Height="Auto">
  149. <Grid.RenderTransform>
  150. <TransformGroup>
  151. <ScaleTransform/>
  152. <SkewTransform/>
  153. <RotateTransform/>
  154. <TranslateTransform/>
  155. </TransformGroup>
  156. </Grid.RenderTransform>
  157. <Controls:ResearchControl Regions:RegionManager.RegionName="ResearchRegion">
  158. <Controls:ResearchControl.Template>
  159. <ControlTemplate TargetType="Controls:ResearchControl">
  160. <Grid>
  161. <Grid.RowDefinitions>
  162. <RowDefinition Height="Auto"/>
  163. <RowDefinition Height="*"/>
  164. </Grid.RowDefinitions>
  165. <Border Grid.Row="0" Height="30" CornerRadius="12,12,12,12" Margin="0,0,0,10" BorderBrush="#FFFFFFFF" BorderThickness="2,2,2,2" x:Name="rightHeader" Canvas.ZIndex="1" Opacity="0.9" Background="{StaticResource sideBarHeaderBarBG}">
  166. <ItemsControl ItemsSource="{TemplateBinding Headers}" HorizontalAlignment="Center">
  167. <ItemsControl.ItemsPanel>
  168. <ItemsPanelTemplate>
  169. <StackPanel Orientation="Horizontal" />
  170. </ItemsPanelTemplate>
  171. </ItemsControl.ItemsPanel>
  172. </ItemsControl>
  173. </Border>
  174. <Controls:RoundedBox Grid.Row="1" />
  175. <ScrollViewer Width="285" Grid.Row="1" d:LayoutOverrides="Margin" Style="{StaticResource ScrollViewerStyle}" VerticalScrollBarVisibility="Auto">
  176. <ItemsPresenter Width="285" d:LayoutOverrides="Margin" />
  177. </ScrollViewer>
  178. </Grid>
  179. </ControlTemplate>
  180. </Controls:ResearchControl.Template>
  181. </Controls:ResearchControl>
  182. </Grid>
  183. <!-- details -->
  184. <Grid x:Name="DetailsGrid" Grid.Row="2" Margin="10,10,10,10" RenderTransformOrigin="0.5,0.5">
  185. <Grid.RenderTransform>
  186. <TransformGroup>
  187. <ScaleTransform/>
  188. <SkewTransform/>
  189. <RotateTransform/>
  190. <TranslateTransform/>
  191. </TransformGroup>
  192. </Grid.RenderTransform>
  193. <ContentControl Regions:RegionManager.RegionName="ActionRegion" x:Name="ActionControl" LayoutUpdated="ActionControl_LayoutUpdated" >
  194. <ContentControl.Template>
  195. <ControlTemplate>
  196. <Grid>
  197. <Controls:RoundedBox />
  198. <ContentPresenter Margin="10,0,10,0" />
  199. </Grid>
  200. </ControlTemplate>
  201. </ContentControl.Template>
  202. </ContentControl>
  203. </Grid>
  204. </Grid>
  205. </Grid>
  206. </UserControl>