PageRenderTime 55ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/IronPython_Main/Languages/Ruby/Samples/Tutorial/app/design/TutorialSL/MainPage.xaml

#
XAML | 149 lines | 124 code | 4 blank | 21 comment | 0 complexity | 3bef30bc40d5a48a9486a97b9644af5d MD5 | raw file
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, CPL-1.0, CC-BY-SA-3.0, BSD-3-Clause, ISC, AGPL-3.0, LGPL-2.1, Apache-2.0
  1. <UserControl
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. mc:Ignorable="d"
  7. xmlns:local="clr-namespace:TutorialSL"
  8. xmlns:control="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  9. xmlns:syswin="clr-namespace:System.Windows;assembly=System.Windows.Controls"
  10. x:Class="TutorialSL.MainPage" Width="Auto" d:DesignWidth="604.333" d:DesignHeight="513.333">
  11. <UserControl.Resources>
  12. <Storyboard x:Key="tutorial_nav_OnMouseEnter" AutoReverse="False">
  13. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tutorial_nav" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
  14. <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0" KeySpline="0.5,0,0.5,1"/>
  15. </DoubleAnimationUsingKeyFrames>
  16. </Storyboard>
  17. <Storyboard x:Key="tutorial_nav_OnMouseLeave">
  18. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="tutorial_nav" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
  19. <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="275" KeySpline="0.5,0,0.5,1"/>
  20. </DoubleAnimationUsingKeyFrames>
  21. </Storyboard>
  22. <Storyboard x:Key="action_MouseEnter">
  23. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="action" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
  24. <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FFE5E5E5" KeySpline="0.5,0,0.5,1"/>
  25. </ColorAnimationUsingKeyFrames>
  26. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="action" Storyboard.TargetProperty="(TextElement.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
  27. <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FF424242" KeySpline="0.5,0,0.5,1"/>
  28. </ColorAnimationUsingKeyFrames>
  29. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="action" Storyboard.TargetProperty="(TextElement.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
  30. <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FF5F5F5F" KeySpline="0.5,0,0.5,1"/>
  31. </ColorAnimationUsingKeyFrames>
  32. </Storyboard>
  33. <Storyboard x:Key="action_MouseLeave">
  34. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="action" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
  35. <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FFC1C1C1" KeySpline="0.5,0,0.5,1"/>
  36. </ColorAnimationUsingKeyFrames>
  37. <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="action" Storyboard.TargetProperty="(TextElement.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
  38. <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FF424242" KeySpline="0.5,0,0.5,1"/>
  39. </ColorAnimationUsingKeyFrames>
  40. </Storyboard>
  41. <Storyboard x:Key="header_navigation_MouseEnter">
  42. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="header_navigation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
  43. <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0" KeySpline="0.5,0,0.5,1"/>
  44. </DoubleAnimationUsingKeyFrames>
  45. </Storyboard>
  46. <Storyboard x:Key="header_navigation_MouseLeave">
  47. <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="header_navigation" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
  48. <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-18" KeySpline="0.5,0,0.5,1"/>
  49. </DoubleAnimationUsingKeyFrames>
  50. </Storyboard>
  51. </UserControl.Resources>
  52. <Grid x:Name="LayoutRoot" Margin="0">
  53. <Grid x:Name="loading" Background="#BF545454" Visibility="Collapsed">
  54. <Border BorderBrush="#FF484848" BorderThickness="10" Margin="150" CornerRadius="10" Background="White">
  55. <Border.Effect>
  56. <DropShadowEffect BlurRadius="37" Direction="180"/>
  57. </Border.Effect>
  58. <TextBlock FontSize="48" Text="Loading ..." TextWrapping="Wrap" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  59. </Border>
  60. </Grid>
  61. <Grid x:Name="Page">
  62. <Border x:Name="header" BorderBrush="Black" BorderThickness="0" Padding="8,10,8,20" Margin="0" VerticalAlignment="Top" Canvas.ZIndex="10">
  63. <Border.Background>
  64. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  65. <GradientStop Color="#55000000" Offset="0.777"/>
  66. <GradientStop Offset="1"/>
  67. <GradientStop Color="#FFEFEFEF" Offset="0.773"/>
  68. </LinearGradientBrush>
  69. </Border.Background>
  70. <TextBlock x:Name="header_name" HorizontalAlignment="Left" FontSize="32" Text="Pick a tutorial" TextWrapping="Wrap" Margin="0,0,0,-8" FontFamily="Segoe UI"/>
  71. </Border>
  72. <Border x:Name="header_navigation" VerticalAlignment="Top" BorderBrush="#FF424242" BorderThickness="1" Margin="5,0" d:LayoutOverrides="Width" Background="#FF424242" CornerRadius="0,0,10,10" RenderTransformOrigin="0.5,0.5" Canvas.ZIndex="100" Visibility="Collapsed">
  73. <Border.RenderTransform>
  74. <TransformGroup>
  75. <ScaleTransform/>
  76. <SkewTransform/>
  77. <RotateTransform/>
  78. <TranslateTransform Y="-18"/>
  79. </TransformGroup>
  80. </Border.RenderTransform>
  81. <StackPanel Background="{x:Null}" Orientation="Horizontal" Margin="0" VerticalAlignment="Top" >
  82. <TextBlock x:Name="action" Cursor="Hand" Margin="10,0,5,0" Foreground="#FFC1C1C1" Padding="5,3" Text="&lt; back" TextWrapping="Wrap" FontFamily="Segoe UI" FontSize="10.667"/>
  83. </StackPanel>
  84. </Border>
  85. <Grid x:Name="body" Margin="0,50,0,25" Background="White">
  86. <ScrollViewer x:Name="tutorial_scroll" Margin="0,0,25,0" Padding="0" VerticalScrollBarVisibility="Auto">
  87. <local:TutorialPage Margin="0" Background="{x:Null}" Padding="0"/>
  88. </ScrollViewer>
  89. <ScrollViewer x:Name="main_scroll" Margin="0" Padding="8,0,8,16" VerticalScrollBarVisibility="Auto" Visibility="Collapsed">
  90. <StackPanel x:Name="main" VerticalAlignment="Top" Background="White" Margin="0,15,0,0">
  91. <local:TutorialControl Margin="0"/>
  92. <local:TutorialControl Margin="0"/>
  93. </StackPanel>
  94. </ScrollViewer>
  95. </Grid>
  96. <Border x:Name="tutorial_nav" HorizontalAlignment="Right" Width="300" Background="White" BorderBrush="#FF7B7B7B" BorderThickness="5,2,0,2" CornerRadius="10,0,0,10" Padding="2,2,0,2" Margin="0,30,0,10" RenderTransformOrigin="0.5,0.5" Canvas.ZIndex="20" Visibility="Collapsed">
  97. <Border.Resources>
  98. <!-- Chapter TEMPLATE -->
  99. <!--<DataTemplate x:Key="ChapterTemplate">
  100. <TextBlock Text="{Binding name}" />
  101. </DataTemplate>-->
  102. <!-- Section TEMPLATE -->
  103. <!--<syswin:HierarchicalDataTemplate
  104. x:Key="SectionTemplate"
  105. ItemsSource="{Binding chapters}"
  106. ItemTemplate="{StaticResource ChapterTemplate}"
  107. >
  108. <TextBlock Text="{Binding name}" />
  109. </syswin:HierarchicalDataTemplate>-->
  110. </Border.Resources>
  111. <Border.RenderTransform>
  112. <TransformGroup>
  113. <ScaleTransform/>
  114. <SkewTransform/>
  115. <RotateTransform/>
  116. <TranslateTransform X="275"/>
  117. </TransformGroup>
  118. </Border.RenderTransform>
  119. <Grid>
  120. <TextBlock Margin="0" Width="130" Height="18" RenderTransformOrigin="0.5,0.5" Text="Jump to another section" HorizontalAlignment="Left" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="12" >
  121. <TextBlock.RenderTransform>
  122. <TransformGroup>
  123. <ScaleTransform/>
  124. <SkewTransform/>
  125. <RotateTransform Angle="-90"/>
  126. <TranslateTransform X="-58"/>
  127. </TransformGroup>
  128. </TextBlock.RenderTransform>
  129. </TextBlock>
  130. <control:TreeView x:Name="chapters" BorderBrush="{x:Null}" FontSize="13.333" Margin="20,0,0,0" RenderTransformOrigin="0.5,0.5" Padding="0" BorderThickness="0" d:LayoutOverrides="Width" Background="{x:Null}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" MaxWidth="293" FontFamily="Segoe UI">
  131. </control:TreeView>
  132. </Grid>
  133. <!--<ListView Margin="0" Background="White" BorderBrush="White" BorderThickness="0" IsSynchronizedWithCurrentItem="True" FontSize="16">
  134. <ListView.View>
  135. <GridView>
  136. <GridViewColumn/>
  137. </GridView>
  138. </ListView.View>
  139. <ListViewItem Margin="0" Content="Chapter 1"/>
  140. <ListViewItem Margin="0" Content="Chapter 2"/>
  141. </ListView>-->
  142. </Border>
  143. </Grid>
  144. </Grid>
  145. </UserControl>