1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| <UserControl x:Class="AlmostSquare.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="1200" Height="768"> <UserControl.Resources> <Storyboard x:Name="theStory" SpeedRatio="1.5"> <DoubleAnimation Storyboard.TargetName="bordercontainer" Storyboard.TargetProperty="Opacity" From="0.2" To="1" Duration="0:0:2.5"></DoubleAnimation> <DoubleAnimation Storyboard.TargetName="bordercontainer" Storyboard.TargetProperty="Border.RenderTransform.Children[1].Angle" From="70" To="0" Duration="0:0:2" ></DoubleAnimation> <DoubleAnimation Storyboard.TargetName="bordercontainer" Storyboard.TargetProperty="Border.RenderTransform.Children[0].ScaleX" From="0" To="1" Duration="0:0:2" SpeedRatio="1" ></DoubleAnimation> <DoubleAnimation Storyboard.TargetName="bordercontainer" Storyboard.TargetProperty="Border.RenderTransform.Children[0].ScaleY" From="0" To="1" Duration="0:0:2" SpeedRatio="1"></DoubleAnimation> </Storyboard> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <Grid.ColumnDefinitions> <ColumnDefinition Width="905"/> <ColumnDefinition Width="380" /> </Grid.ColumnDefinitions> <Border Name="bordercontainer" Margin="1" Background="White" BorderBrush="DarkBlue" BorderThickness="2" CornerRadius="5" Grid.Column="0" > <Canvas x:Name="canvasImg" Grid.Column="0" > <Image Name="imgSF" Source="Images/sfmapweb.jpg" Width="899" Height="761" Stretch="None" /> </Canvas> <Border.RenderTransform> <TransformGroup> <ScaleTransform></ScaleTransform> <RotateTransform></RotateTransform> </TransformGroup> </Border.RenderTransform> </Border> <Canvas Background="Black" Grid.Column="1"> <TextBlock FontSize="20" Margin="50,5,0,0" Foreground="White" TextWrapping="Wrap" Width="150" TextAlignment="Left"> What's almost square and has a bumpy surface and is surrounded by water and is cool? </TextBlock> <StackPanel Canvas.Left="100" Canvas.Top="250"> <StackPanel.Resources> <LinearGradientBrush x:Name="theGradientBrush" StartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Offset="0.0" Color="LightCyan" /> <GradientStop Offset="0.14" Color="Cyan" /> <GradientStop Offset="0.7" Color="Blue" /> </LinearGradientBrush> </StackPanel.Resources> <Button Content="WELL?" FontSize="14" x:Name="theButton" Background="{StaticResource theGradientBrush}" Canvas.Left="100" Canvas.Top="250" Width="100" Height="50" > </Button> </StackPanel> </Canvas> </Grid> </UserControl> |