PageRenderTime 27ms CodeModel.GetById 19ms app.highlight 3ms RepoModel.GetById 1ms 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
103            <!-- logo -->
104            <Canvas x:Name="Logo" Grid.ColumnSpan="2" RenderTransformOrigin="0.5,0.5">
105                <Canvas.RenderTransform>
106                    <TransformGroup>
107                        <ScaleTransform/>
108                        <SkewTransform/>
109                        <RotateTransform/>
110                        <TranslateTransform/>
111                    </TransformGroup>
112                </Canvas.RenderTransform>
113                <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" />
114                <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"/>
115            </Canvas>
116
117            <!-- main bar -->
118            <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">
119                <ItemsControl.RenderTransform>
120                    <TransformGroup>
121                        <ScaleTransform/>
122                        <SkewTransform/>
123                        <RotateTransform/>
124                        <TranslateTransform/>
125                    </TransformGroup>
126                </ItemsControl.RenderTransform>
127                <ItemsControl.ItemsPanel>
128                    <ItemsPanelTemplate>
129                        <StackPanel Orientation="Horizontal" />
130                    </ItemsPanelTemplate>
131                </ItemsControl.ItemsPanel>
132            </ItemsControl>
133
134            <!-- content -->
135            <Grid x:Name="ContentGrid" Grid.Row="1" Margin="10,0,10,10" RenderTransformOrigin="0.5,0.5">
136                <Grid.RenderTransform>
137                    <TransformGroup>
138                        <ScaleTransform/>
139                        <SkewTransform/>
140                        <RotateTransform/>
141                        <TranslateTransform/>
142                    </TransformGroup>
143                </Grid.RenderTransform>
144                <Controls:AnimatedTabControl Regions:RegionManager.RegionName="MainRegion" Opacity="1"
145        				HorizontalAlignment="Stretch" Background="{StaticResource BorderBackground}" 
146        				BorderBrush="{x:Null}"
147        				Regions:TabControlRegionAdapter.ItemContainerStyle="{StaticResource CustomTabItemStyle}"
148                        VerticalAlignment="Stretch" Padding="10,10,10,10" AutomationProperties.AutomationId="PositionSummaryTab" />
149            </Grid>
150
151            <!-- sidebar -->
152            <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">
153                <Grid.RenderTransform>
154                    <TransformGroup>
155                        <ScaleTransform/>
156                        <SkewTransform/>
157                        <RotateTransform/>
158                        <TranslateTransform/>
159                    </TransformGroup>
160                </Grid.RenderTransform>
161
162                <Controls:ResearchControl Regions:RegionManager.RegionName="ResearchRegion">
163                    <Controls:ResearchControl.Template>
164                        <ControlTemplate TargetType="Controls:ResearchControl">
165
166                            <Grid>
167                                <Grid.RowDefinitions>
168                                    <RowDefinition Height="Auto"/>
169                                    <RowDefinition Height="*"/>
170                                </Grid.RowDefinitions>
171                                <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}">
172                                    <ItemsControl ItemsSource="{TemplateBinding Headers}" HorizontalAlignment="Center">
173                                        <ItemsControl.ItemsPanel>
174                                            <ItemsPanelTemplate>
175                                                <StackPanel Orientation="Horizontal" />
176                                            </ItemsPanelTemplate>
177                                        </ItemsControl.ItemsPanel>
178                                    </ItemsControl>
179                                </Border>
180                                <Controls:RoundedBox Grid.Row="1" />
181                                <ScrollViewer Width="285" Grid.Row="1" d:LayoutOverrides="Margin" Style="{StaticResource ScrollViewerStyle}" VerticalScrollBarVisibility="Auto">
182                                    <ItemsPresenter Width="285" d:LayoutOverrides="Margin" />
183                                </ScrollViewer>
184                            </Grid>
185                        </ControlTemplate>
186                    </Controls:ResearchControl.Template>
187                </Controls:ResearchControl>
188
189            </Grid>
190
191            <!-- details -->
192            <Grid x:Name="DetailsGrid" Grid.Row="2" Margin="10,10,10,10" RenderTransformOrigin="0.5,0.5">
193                <Grid.RenderTransform>
194                    <TransformGroup>
195                        <ScaleTransform/>
196                        <SkewTransform/>
197                        <RotateTransform/>
198                        <TranslateTransform/>
199                    </TransformGroup>
200                </Grid.RenderTransform>
201                <ContentControl Regions:RegionManager.RegionName="ActionRegion" x:Name="ActionControl" LayoutUpdated="ActionControl_LayoutUpdated" >
202                    <ContentControl.Template>
203                        <ControlTemplate>
204                            <Grid>
205                                <Controls:RoundedBox />
206                                <ContentPresenter Margin="10,0,10,0" />
207                            </Grid>
208                        </ControlTemplate>
209                    </ContentControl.Template>
210                </ContentControl>
211            </Grid>
212        </Grid>
213    </Grid>
214
215</UserControl>
216