Hi Alex,
The Expression Blend is a designer. All actions we do in the Blend can be
achieved by the directly modifying the Page.xaml file. To assign a gradient
brush to the canvas, we can use the following xaml file,
<UserControl x:Class="SL2Hello.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<Canvas>
<Canvas.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="White" Offset="0.0"></GradientStop>
<GradientStop Color="LimeGreen"
Offset="0.5"></GradientStop>
<GradientStop Color="Green" Offset="1.0"></GradientStop>
</LinearGradientBrush>
</Canvas.Background>
<TextBlock Text="Enter a Name" Canvas.Left="64"
Canvas.Top="55"/>
<TextBox x:Name="txtName" Canvas.Left="180" Canvas.Top="55"
Height="25" Width="100"/>
<Button x:Name="buttonHello" Canvas.Left="120" Canvas.Top="105"
Width="100"
Content="Say Hello" Click="buttonHello_Click"/>
<TextBlock x:Name="txtSayHello" Canvas.Left="100"
Canvas.Top="150"/>
</Canvas>
</Grid>
</UserControl>
Best regards,
Colbert Zhou
Microsoft Newsgroup Support Team
|