+4  A: 

You might want to check out Charles Petzolds article on Graphical Paths with Gradient Colors in which he discusses a similar problem to yours.

Ruben Steins
Cheers, looks good :)
Louis Sayers
A: 
    <Grid x:Name="grid" VerticalAlignment="Top" HorizontalAlignment="Left" Width="100" Height="100" Margin="200,200,0,0">
         <Rectangle VerticalAlignment="Stretch" Width="20" HorizontalAlignment="Right" Margin="0,20,0,20" StrokeThickness="0" Panel.ZIndex="0">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Bottom" Height="20" HorizontalAlignment="Stretch" Margin="20,0,20,0">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="1,1" StartPoint="1,0">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Stretch" Width="20" HorizontalAlignment="Left" Margin="0,20,0,20" StrokeThickness="0" Panel.ZIndex="0">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0,0" StartPoint="1,0">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Top" Height="20" HorizontalAlignment="Stretch" Margin="20,0,20,0">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="1,0" StartPoint="1,1">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Top" Height="20" Width="20" HorizontalAlignment="Left" Margin="0,0,0,0">
            <Rectangle.Fill>
                <RadialGradientBrush Center=".9,.9" GradientOrigin="1,1" RadiusX=".85" RadiusY=".85">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </RadialGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Bottom" Height="20" Width="20" HorizontalAlignment="Right" Margin="0,0,0,0">
            <Rectangle.Fill>
                <RadialGradientBrush Center=".1,.1" GradientOrigin="0,0" RadiusX=".85" RadiusY=".85">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </RadialGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Top" Height="20" Width="20" HorizontalAlignment="Right" Margin="0,0,0,0">
            <Rectangle.Fill>
                <RadialGradientBrush Center=".1,.9" GradientOrigin="0,1" RadiusX=".85" RadiusY=".85">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </RadialGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle VerticalAlignment="Bottom" Height="20" Width="20" HorizontalAlignment="Left" Margin="0,0,0,0">
            <Rectangle.Fill>
                <RadialGradientBrush Center=".9,.1" GradientOrigin="1,0" RadiusX=".85" RadiusY=".85">
                    <GradientStop Color="#00FFFFFF" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                    <GradientStop Color="#22FFFFFF" Offset="0.5"/>
                    <GradientStop Color="#11FFFFFF" Offset="0.3"/>
                </RadialGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
    </Grid>
Ivamuno