posted on Tuesday, April 11, 2006 12:14 PM by Sean Gerety

XAML for PSP Background in XAML

I didn't want to include the XAML with the last post just because of the size. If you want it, here it is. The scene1.xaml, application.xaml and Tags.xml file. Just open a new project in the Feb CTP of Expression Interactive Designer and swap the XAML in each file for mine.  Have fun.

Tags: Expression | XAML

-----------------------Scene1.xaml-----------------------
<Grid  xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="
http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:c="
http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:d="
http://schemas.microsoft.com/expression/interactivedesigner/2005"
 c:Ignorable="d"
 x:Name="DocumentRoot"
 x:Class="UntitledProject1.Scene1"
 Width="640" Height="480">

 <Grid.Resources>
  <Storyboard x:Key="OnLoaded">
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="topCurve" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[5].(TranslateTransform.Y)">
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="70" KeyTime="00:00:00"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="70" KeyTime="00:00:10"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:20"/>
   </DoubleAnimationUsingKeyFrames>
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="bottomCurve" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[5].(TranslateTransform.Y)">
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="-50" KeyTime="00:00:00"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:20"/>
   </DoubleAnimationUsingKeyFrames>
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="topCurve" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[5].(TranslateTransform.X)">
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:0"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="-150" KeyTime="00:00:10"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:20"/>
   </DoubleAnimationUsingKeyFrames>
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="topSlash" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[5].(TranslateTransform.Y)">
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="-10" KeyTime="00:00:10"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:20"/>
   </DoubleAnimationUsingKeyFrames>
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" Storyboard.TargetName="bottomSlash" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[5].(TranslateTransform.Y)">
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="10" KeyTime="00:00:10"/>
    <SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:20"/>
   </DoubleAnimationUsingKeyFrames>   
  </Storyboard>
  <XmlDataProvider x:Key="TagsDS" d:IsDataSource="True" Source="C:\WinFX\Sean\RadialTree\RadialTree\Tags.xml"/>
  <HierarchicalDataTemplate x:Key="TagsHierTemplate" ItemsSource="{Binding XPath=Tag}">
   <StackPanel Orientation="Vertical" Background="{x:Null}">
   <Border BorderBrush="#FFFFFFFF" CornerRadius="7,0,0,7" BorderThickness="1,1,1,1" Padding="3,3,3,3">
    <StackPanel Orientation="Horizontal">
     <TextBlock FontSize="12" FontFamily="Calibri" Text="Tag: "/>
     <TextBlock FontSize="12" FontFamily="Calibri" Text="{Binding Mode=OneWay,
XPath=@name}"/>
    </StackPanel>
   </Border>
   <Border BorderBrush="#FFFFFFFF" CornerRadius="7,0,0,7" BorderThickness="1,1,1,1" Padding="3,3,3,3">
    <StackPanel Orientation="Horizontal">
     <TextBlock FontSize="12" FontFamily="Calibri" Text="Related Tags: " Foreground="sc#1, 0.0121860988, 0.0524424054, 0.3"/>
     <TextBlock FontSize="12" FontFamily="Calibri" Text="{Binding Mode=OneWay,
XPath=@relatedTags}" Foreground="sc#1, 0.0121748159, 0.05304598, 0.3"/>
    </StackPanel>
   </Border>
   </StackPanel>
  </HierarchicalDataTemplate>
 </Grid.Resources>

 <Grid.Triggers>
  <EventTrigger RoutedEvent="FrameworkElement.Loaded">
   <EventTrigger.Actions>
    <BeginStoryboard x:Name="OnLoaded_BeginStoryboard" Storyboard="{DynamicResource OnLoaded}"/>
   </EventTrigger.Actions>
  </EventTrigger>
 
 </Grid.Triggers>
 
 <Grid.ColumnDefinitions>
  <ColumnDefinition Width="*"/>
 </Grid.ColumnDefinitions>
 <Grid.RowDefinitions>
  <RowDefinition/>
 </Grid.RowDefinitions>
 <Grid.Background>
  <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
   <LinearGradientBrush.RelativeTransform>
    <TransformGroup>
     <TranslateTransform X="-0.5" Y="-0.5"/>
     <ScaleTransform ScaleX="1" ScaleY="1"/>
     <SkewTransform AngleX="0" AngleY="0"/>
     <RotateTransform Angle="90.495202139271512" CenterX="0" CenterY="0"/>
     <TranslateTransform X="0.5" Y="0.5"/>
     <TranslateTransform X="5.5511151231257827E-17" Y="5.5511151231257827E-17"/>
    </TransformGroup>
   </LinearGradientBrush.RelativeTransform>
   <LinearGradientBrush.GradientStops>
    <GradientStopCollection>
     <GradientStop Color="sc#1, 0.0217442848, 0.0835272, 0.6380811" Offset="0.10999281092739174"/>
     <GradientStop Color="sc#1, 0.06484591, 0.340538949, 0.9888191" Offset="1"/>
    </GradientStopCollection>
   </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>
 </Grid.Background>
 <TreeView FontFamily="Segoe UI" Width="Auto" Height="Auto" x:Name="TreeView" MinWidth="0" RenderTransformOrigin="2.26666666666667,2.43684210526316" Margin="82,67.0000000000001,127,78.9999999999999" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="0" Background="sc#0.273407549, 1, 1, 1" ItemTemplate="{DynamicResource TagsHierTemplate}">
  <TreeView.RenderTransform>
   <TransformGroup>
    <TranslateTransform X="0" Y="0"/>
    <ScaleTransform ScaleX="1" ScaleY="1"/>
    <SkewTransform AngleX="0" AngleY="0"/>
    <RotateTransform Angle="0" CenterX="0" CenterY="0"/>
    <TranslateTransform X="0" Y="0"/>
    <TranslateTransform X="0" Y="0"/>
   </TransformGroup>
  </TreeView.RenderTransform>
  <TreeView.ItemsSource>
   <Binding Mode="Default" Source="{StaticResource TagsDS}" XPath="/Tags/Tag"/>
  </TreeView.ItemsSource>
 </TreeView>
 <Path Fill="#FFFFFFFF" StrokeThickness="20" Width="Auto" Height="57.5" Opacity="0.75" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.ColumnSpan="1" MinWidth="0" Margin="-12,112.5,-17,0" d:IsLocked="True" x:Name="topSlash" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
  <Path.Stroke>
   <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
    <LinearGradientBrush.RelativeTransform>
     <TransformGroup>
      <TranslateTransform X="-0.5" Y="-0.5"/>
      <ScaleTransform ScaleX="1.2435054172657669" ScaleY="1.2435054172657669"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="477.95477847268165" CenterX="0" CenterY="0"/>
      <TranslateTransform X="0.5" Y="0.5"/>
      <TranslateTransform X="-0.0019498249295469782" Y="0.12173975574234734"/>
     </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <LinearGradientBrush.GradientStops>
     <GradientStopCollection>
      <GradientStop Color="sc#1, 1, 1, 1" Offset="0"/>
      <GradientStop Color="sc#0, 0, 0, 0" Offset="0.45794392523364624"/>
     </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
   </LinearGradientBrush>
  </Path.Stroke>
  <Path.RenderTransform>
   <TransformGroup>
    <TranslateTransform X="0" Y="0"/>
    <ScaleTransform ScaleX="1" ScaleY="1"/>
    <SkewTransform AngleX="0" AngleY="0"/>
    <RotateTransform Angle="0"/>
    <TranslateTransform X="0" Y="0"/>
    <TranslateTransform X="0" Y="0"/>
   </TransformGroup>
  </Path.RenderTransform>
  <Path.Data>
   <PathGeometry>
    <PathGeometry.Figures>
     <PathFigureCollection>
      <PathFigure StartPoint="16,113">
       <LineSegment Point="635,127"/>
      </PathFigure>
     </PathFigureCollection>
    </PathGeometry.Figures>
   </PathGeometry>
  </Path.Data>
 </Path>
 <Path Fill="#FFFFFFFF" StrokeThickness="20" Width="Auto" Height="57.5" Opacity="0.750461667538832" VerticalAlignment="Bottom" Grid.ColumnSpan="1" MinWidth="0" Margin="-12,0,-17,175" d:IsLocked="True" x:Name="bottomSlash" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
  <Path.Stroke>
   <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
    <LinearGradientBrush.RelativeTransform>
     <TransformGroup>
      <TranslateTransform X="-0.5" Y="-0.5"/>
      <ScaleTransform ScaleX="1.2435054172657669" ScaleY="1.2435054172657669"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="477.95477847268165" CenterX="0" CenterY="0"/>
      <TranslateTransform X="0.5" Y="0.5"/>
      <TranslateTransform X="-0.0019498249295469782" Y="0.12173975574234734"/>
     </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <LinearGradientBrush.GradientStops>
     <GradientStopCollection>
      <GradientStop Color="sc#1, 1, 1, 1" Offset="0"/>
      <GradientStop Color="sc#0, 0, 0, 0" Offset="0.45794392523364624"/>
     </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
   </LinearGradientBrush>
  </Path.Stroke>
  <Path.RenderTransform>
   <TransformGroup>
    <TranslateTransform X="0" Y="0"/>
    <ScaleTransform ScaleX="1" ScaleY="-1"/>
    <SkewTransform AngleX="0" AngleY="0"/>
    <RotateTransform Angle="0.13471421727346922"/>
    <TranslateTransform X="0" Y="0"/>
    <TranslateTransform X="0" Y="0"/>
   </TransformGroup>
  </Path.RenderTransform>
  <Path.Data>
   <PathGeometry>
    <PathGeometry.Figures>
     <PathFigureCollection>
      <PathFigure StartPoint="16,113">
       <LineSegment Point="635,127"/>
      </PathFigure>
     </PathFigureCollection>
    </PathGeometry.Figures>
   </PathGeometry>
  </Path.Data>
 </Path>
 <Button Width="72" Height="25" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,127,28" x:Name="AnimateButton" Template="{StaticResource ButtonControlTemplate1}" RenderTransformOrigin="0.5,0.5" Content="Style Test">
  <Button.Background>
   <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
    <LinearGradientBrush.RelativeTransform>
     <TransformGroup>
      <TranslateTransform X="-0.5" Y="-0.5"/>
      <ScaleTransform ScaleX="1" ScaleY="1"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="-0.65224618020171476"/>
      <TranslateTransform X="0.5" Y="0.5"/>
      <TranslateTransform X="0" Y="0"/>
     </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <LinearGradientBrush.GradientStops>
     <GradientStopCollection>
      <GradientStop Color="#FFFFFFFF" Offset="0"/>
      <GradientStop Color="#FFE3E5F0" Offset="0.21016055595495031"/>
      <GradientStop Color="#FFC6C5D7" Offset="1"/>
      <GradientStop Color="sc#1, 0.152266786, 0.197392941, 0.808730066" Offset="0.57392763000239877"/>
     </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
   </LinearGradientBrush>
  </Button.Background>
 </Button>
 <Path Fill="{x:Null}" StrokeThickness="30" Width="Auto" Height="91.743971824646" Opacity="0.73777572111677647" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Grid.ColumnSpan="1" MinWidth="0" Margin="-143,0,-30.9999999999998,115.256025791168" d:LastTangent="73,-126" d:IsLocked="True" x:Name="bottomCurve" RenderTransformOrigin="0.5,0.5" Stretch="Fill">
  <Path.Stroke>
   <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
    <LinearGradientBrush.RelativeTransform>
     <TransformGroup>
      <TranslateTransform X="-0.5" Y="-0.5"/>
      <ScaleTransform ScaleX="1.6634615772107915" ScaleY="1.6634615772107915"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="596.72979310267885" CenterX="0" CenterY="0"/>
      <TranslateTransform X="0.5" Y="0.5"/>
      <TranslateTransform X="0.44519956050177056" Y="-0.34422471286323414"/>
     </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <LinearGradientBrush.GradientStops>
     <GradientStopCollection>
      <GradientStop Color="sc#1, 1, 1, 1" Offset="0.020369039060629125"/>
      <GradientStop Color="sc#0, 0, 0, 0" Offset="0.41576803259046397"/>
     </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
   </LinearGradientBrush>
  </Path.Stroke>
  <Path.RenderTransform>
   <TransformGroup>
    <TranslateTransform X="0" Y="0"/>
    <ScaleTransform ScaleX="1" ScaleY="1"/>
    <SkewTransform AngleX="0" AngleY="0"/>
    <RotateTransform Angle="0"/>
    <TranslateTransform X="0" Y="0"/>
    <TranslateTransform X="0" Y="0"/>
   </TransformGroup>
  </Path.RenderTransform>
  <Path.Data>
   <PathGeometry>
    <PathGeometry.Figures>
     <PathFigureCollection>
      <PathFigure StartPoint="-66.0000002324367,350.000030123091">
       <BezierSegment Point1="-24.0000002324363,358.000030123091" Point2="669.999996493025,366.00001503891" Point3="728,283.000021457677"/>
      </PathFigure>
     </PathFigureCollection>
    </PathGeometry.Figures>
   </PathGeometry>
  </Path.Data>
 </Path>
 <Path Fill="{x:Null}" StrokeThickness="20" Width="Auto" Height="110.32835483551" Opacity="0.72508977469471747" VerticalAlignment="Top" Grid.ColumnSpan="1" MinWidth="0" Margin="-179.092762838862,63.7289762446784,-211.970287431218,0" x:Name="topCurve" RenderTransformOrigin="0.518255578093307,0.533062619784211" Stretch="Fill" d:IsLocked="True">
  <Path.Stroke>
   <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
    <LinearGradientBrush.RelativeTransform>
     <TransformGroup>
      <TranslateTransform X="-0.5" Y="-0.5"/>
      <ScaleTransform ScaleX="1.4312933278681035" ScaleY="1.4312933278681035"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="308.88157753904562" CenterX="0" CenterY="0"/>
      <TranslateTransform X="0.5" Y="0.5"/>
      <TranslateTransform X="0.0031035929487749432" Y="-0.78326644096635478"/>
     </TransformGroup>
    </LinearGradientBrush.RelativeTransform>
    <LinearGradientBrush.GradientStops>
     <GradientStopCollection>
      <GradientStop Color="#FFFFFFFF" Offset="0"/>
      <GradientStop Color="sc#0, 0, 0, 0" Offset="0.18907260963335842"/>
     </GradientStopCollection>
    </LinearGradientBrush.GradientStops>
   </LinearGradientBrush>
  </Path.Stroke>
  <Path.RenderTransform>
   <TransformGroup>
    <TranslateTransform X="0" Y="0"/>
    <ScaleTransform ScaleX="1" ScaleY="1"/>
    <SkewTransform AngleX="0" AngleY="0"/>
    <RotateTransform Angle="179.53644306913355"/>
    <TranslateTransform X="0" Y="0"/>
    <TranslateTransform X="0" Y="0"/>
   </TransformGroup>
  </Path.RenderTransform>
  <Path.Data>
   <PathGeometry>
    <PathGeometry.Figures>
     <PathFigureCollection>
      <PathFigure StartPoint="-129,144.999996311621">
       <BezierSegment Point1="-93.8553009180891,141.762984554077" Point2="-43.6799199672836,85.5647453804079" Point3="37.5043519185653,85.2370074424914"/>
       <PolyBezierSegment Points="142.02698,84.815053 456.50435,156.23702 531.50435,164.23702 728.27891,201.89182 861.28632,144.09986 882.53445,115.65478 "/>
      </PathFigure>
     </PathFigureCollection>
    </PathGeometry.Figures>
 &n