<Page 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
           xmlns:local="clr-namespace:ControlExplorer"
           xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" x:Class="ControlExplorer.HomePage"
           mc:Ignorable="d"
           d:DesignWidth="990" d:DesignHeight="650"
           Title="ComponentOne Control Explorer">
    <Page.Resources>
        <Storyboard x:Key="LoadStoryboard">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(ScaleTransform.ScaleX)" Storyboard.TargetName="border">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.01"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.01">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <QuinticEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)" Storyboard.TargetName="border">
                <EasingDoubleKeyFrame KeyTime="0" Value="-1000"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(c1:C1SlideContentControl.Slide)" Storyboard.TargetName="header">
                <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="1">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <ExponentialEase EasingMode="EaseOut"/>
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="header">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.9" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="welcome">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.5" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="welcomeSection">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.4" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.7" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="c1Button">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.9" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="whatsNew">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.9" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="whatSection">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.7" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="vButton">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.9" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="favorites">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1.9" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.2" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="exploreButton">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.6" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="search">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.6" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="footer">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.5" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.8" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="scrollViewer">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.1" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border1">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:2.6" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

    </Page.Resources>
    <Grid>
        <Border x:Name="border" Grid.Column="1" Grid.Row="1" Margin="-5" BorderBrush="#02000000" BorderThickness="1" CornerRadius="4" RenderTransformOrigin="0.5,0.5" >
            <Border.RenderTransform>
                <TransformGroup>
                    <TranslateTransform />
                    <ScaleTransform />
                </TransformGroup>
            </Border.RenderTransform>
            <Border BorderBrush="#0A000000" BorderThickness="1" CornerRadius="3" >
                <Border BorderBrush="#14000000" BorderThickness="1" CornerRadius="2" >
                    <Border BorderBrush="#1E000000" BorderThickness="1" CornerRadius="1" >
                        <Border BorderBrush="#26000000" BorderThickness="1" >
                            <Border>
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                        <GradientStop Color="#B2FFFFFF" Offset="0"/>
                                        <GradientStop Color="#99FFFFFF" Offset="0.07"/>
                                        <GradientStop Color="#99FFFFFF" Offset="0.93"/>
                                        <GradientStop Color="#B2FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                        </Border>
                    </Border>
                </Border>
            </Border>
        </Border>

        <Grid x:Name="LayoutRoot" >
            <Grid.Triggers>
                <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                    <BeginStoryboard >
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="search">
                                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                <EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="0"/>
                                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Grid.Triggers>
            <Grid.RowDefinitions>
                <RowDefinition Height="125" />
                <RowDefinition Height="45" />
                <RowDefinition Height="*" />
                <RowDefinition Height="70" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="45" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="45" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="45" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="45" />
            </Grid.ColumnDefinitions>
            <!--Header-->
            <c1:C1SlideContentControl x:Name="header" Width="1124" VerticalAlignment="Top" Grid.ColumnSpan="8" SlideDirection="Up">
                <Image Width="1125" Height="132" Source="/Resources/homeHeader.jpg" Stretch="Fill"/>
            </c1:C1SlideContentControl>
            <!--Welcome-->
            <TextBlock x:Name="welcome" Text="welcome" Grid.Column="1" Style="{StaticResource HomeTitle}"/>
            <ScrollViewer x:Name="welcomeSection" Grid.Column="1" Grid.Row="2" VerticalAlignment="Top" Padding="0,0,10,0" Style="{StaticResource GralScrollViewer}" HorizontalAlignment="Left">
                <TextBlock Style="{StaticResource SimpleText}" MaxWidth="270">
                    <Run Text="Leveraging the full potential of WPF, ComponentOne Studio® WPF Edition offers everything from high-performing datagrids, charts and scheduler controls to slick layout and navigation controls."/>
                    <LineBreak/>
                    <LineBreak/>
                    <Run Text="Accomplish more enterprise-level functionality in less time."/>
                    <LineBreak/>
                    <LineBreak/>
                    <Run Text="Studio WPF Edition features all of the rich data visualization and LOB controls you need to shorten your development time and create compelling Windows desktop applications. "/>
                    <LineBreak/>
                    <LineBreak/>
                    <Run Text="Choose from"/>
                    <Bold><Run Text=" 50+ WPF controls"/></Bold>
                    <Run Text=" packed with developer-requested features like easy styling, printing, export to Microsoft Excel, complete XAML support, and more. "/>
                </TextBlock>
                <c1:ScrollViewerTouchBehavior.TouchBehavior>
                    <c1:ScrollViewerTouchBehavior/>
                </c1:ScrollViewerTouchBehavior.TouchBehavior>
            </ScrollViewer>
            <Button x:Name="c1Button" Width="270" Height="60" Click="c1Button_Click" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0,2,0,0" Style="{StaticResource EmptyButton}" HorizontalContentAlignment="Left">
                <Image Source="/ControlExplorer;component/Resources/C1Logo.png" Stretch="None" Margin="0,0,0,4" Width="200" Height="45" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
            </Button>

            <!--What's new-->
            <TextBlock x:Name="whatsNew" Text="what's new" Grid.Column="3" Style="{StaticResource HomeTitle}"/>
            <ScrollViewer x:Name="whatSection" Grid.Row="2" Grid.Column="3" VerticalAlignment="Top" Padding="0" Style="{StaticResource GralScrollViewer}">
                <!--	<StackPanel>
                    <Button Content="OrgChart" Height="60" Margin="0,0,0,10" Style="{StaticResource WhatnewButton}" Cursor="Hand"/>            
                </StackPanel>-->
                <!--New Features List-->
                <ItemsControl ItemsSource="{Binding NewFeatures}" Background="Transparent">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="0 0 0 10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="10"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <Image HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Center" Height="66" Width="66" Source="{Binding ImageSource}"/>
                                <StackPanel Orientation="Vertical" VerticalAlignment="Center" Grid.Column="2">
                                    <TextBlock Style="{StaticResource WNewTitle}" Text="{Binding Title}" Width="Auto" TextWrapping="Wrap"/>
                                    <ItemsControl ItemsSource="{Binding Remarks}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <c1:C1HyperlinkButton NavigateUri="{Binding Link}" Content="{Binding Description}" 
                                                    ToolTipService.ToolTip="{Binding Link}" IsEnabled="{Binding HasLink}" TargetName="{Binding TargetName}"
                                                    Style="{StaticResource WNewText}"  />
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
                <c1:ScrollViewerTouchBehavior.TouchBehavior>
                    <c1:ScrollViewerTouchBehavior/>
                </c1:ScrollViewerTouchBehavior.TouchBehavior>
            </ScrollViewer>
            <!-- Release Number/Date -->
            <Grid x:Name="vButton" Grid.Column="3" Grid.Row="3" Height="75" VerticalAlignment="Bottom" Margin="0,-5,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Path x:Name="path" Data="M66.013519,1 L78.460152,13.988848 L85,13.988848 L85,73 L1.0038538,73 L1.0038538,46.39769 L1,46.39769 L1,13.988848 L53.566898,13.988848 z" Fill="#FF91989C" Stretch="Fill" Stroke="#FFD9DCDD" StrokeThickness="2" UseLayoutRounding="False" Width="86"/>
                <Border Grid.Column="1" Background="#FF91989C" BorderBrush="#FFD9DCDD" BorderThickness="0,2,2,2" Margin="-3,13,0,0"/>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="2,0,5,7" Grid.ColumnSpan="2">
                    <Image Source="/Resources/ico-Info.png" VerticalAlignment="Center" Stretch="None"/>
                    <TextBlock TextWrapping="Wrap" Text="V3" FontFamily="Segoe WP SemiLight" FontSize="28" Foreground="#FF1E2A2E" VerticalAlignment="Center" Margin="0,-3,0,0"/>
                    <TextBlock TextWrapping="Wrap" Text=" November 2015" FontFamily="Segoe WP SemiLight" FontSize="18" Foreground="White" VerticalAlignment="Bottom" Margin="2,0,0,9"/>
                </StackPanel>
            </Grid>

            <!--Favorites-->
            <TextBlock x:Name="favorites" Text="favorites" Grid.Column="5" Style="{StaticResource HomeTitle}"/>
            <ScrollViewer x:Name="scrollViewer" FontFamily="Segoe WP SemiLight" FontSize="10" FontWeight="Normal" Grid.Column="5" Grid.Row="2" Margin="0 0 -10 0" Padding="0" Style="{StaticResource GralScrollViewer}">
                <c1:C1WrapPanel x:Name="favoritesPanel" Background="Transparent" ItemWidth="76" ItemHeight="76" MaxWidth="344" SizeChanged="favoritesPanel_SizeChanged" />
                <c1:ScrollViewerTouchBehavior.TouchBehavior>
                    <c1:ScrollViewerTouchBehavior/>
                </c1:ScrollViewerTouchBehavior.TouchBehavior>
            </ScrollViewer>
            <Grid Grid.Column="5" Grid.Row="3" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Border x:Name="border1" Grid.Column="1" Background="#FFD86314" BorderBrush="#FFF3F9FB" BorderThickness="0,2,2,2" Margin="-1,8,0,0"/>
                <c1:C1HyperlinkButton Content="Explore All" x:Name="exploreButton" NavigateUri="/Views/ControlsPage.xaml" Style="{StaticResource HomeExploreHyperlinkButton}" Margin="0,-5,0,0" Grid.Column="0" HorizontalAlignment="Left" />
            </Grid>
            <!-- Search -->
            <local:SearchControl x:Name="search" HorizontalAlignment="Right" Width="250" Grid.Column="0" Grid.ColumnSpan="6" VerticalAlignment="Top" Margin="0,12,0,0"/>
            <!--Footer-->
            <Grid x:Name="footer" Grid.Row="3" Grid.ColumnSpan="7">
                <Path Data="M20,4 L40,24 L0,24 z M77,40 z" HorizontalAlignment="Left" Stretch="Fill" UseLayoutRounding="False" Width="48" Height="23" VerticalAlignment="Bottom" Margin="56,-4,0,51" Fill="#FFDBDFE0" d:LayoutOverrides="GridBox"/>
                <Path Data="M20,4 L40,24 L0,24 z M77,40 z" HorizontalAlignment="Left" Stretch="Fill" UseLayoutRounding="False" Width="48" Height="23" VerticalAlignment="Bottom" Margin="56,-11,-24,48" Fill="#FFB6B9BA" d:LayoutOverrides="GridBox"/>
                <Image Grid.ColumnSpan="7" Height="5" Grid.Row="3" Source="/ControlExplorer;component/Resources/homeFooter.png" Stretch="Fill" VerticalAlignment="Bottom" Width="1124" Opacity="0.5"/>
            </Grid>
        </Grid>
    </Grid>
</Page>
