Skip to content

Instantly share code, notes, and snippets.

@SittenSpynne
Created October 12, 2010 19:09
Show Gist options
  • Save SittenSpynne/622729 to your computer and use it in GitHub Desktop.
Save SittenSpynne/622729 to your computer and use it in GitHub Desktop.
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Window.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0, 1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="White" Offset="0.0" />
<GradientStop Color="Black" Offset="0.4" />
<GradientStop Color="Black" Offset="0.5" />
<GradientStop Color="Black" Offset="0.6" />
<GradientStop Color="White" Offset="1.0" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Window.Background>
<Canvas>
<Grid
Background="#80C00000"
Width="150"
Height="300">
<TextBlock>This is layer 0.</TextBlock>
</Grid>
<Grid
Canvas.Left="100"
Background="#80FFFF00"
Width="250"
Height="300">
<Button VerticalAlignment="Center">OK</Button>
</Grid>
<Grid
Canvas.Left="200"
Background="#400000FF"
Width="250"
Height="300">
<ListBox Opacity="0.75">
<ListBoxItem>Item1</ListBoxItem>
<ListBoxItem>Item2</ListBoxItem>
</ListBox>
</Grid>
<TextBlock
Canvas.Top="100"
Canvas.Left="5"
FontSize="25"
Text="I'm going to fade into the background...">
<TextBlock.Foreground>
<LinearGradientBrush StartPoint="0, 0" EndPoint="1, 0">
<GradientStop Color="White" Offset="0.0" />
<GradientStop Color="Transparent" Offset="1.25" />
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
</Canvas>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment