The Cool Windows 7 Selection in XAML
Aug 26, 2009
Here's the XAML to make a selection rectangle similar to the one in Win7:
<Grid Height="22" Width="300" >
<Rectangle Stroke="#FF7DA2CE" RadiusX="2" RadiusY="2">
<Rectangle.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFDCEBFC" Offset="0" />
<GradientStop Color="#FFC1DBFC" Offset="1" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Margin="1" Stroke="#FFEBF4FD" RadiusX="2" RadiusY="2" Fill="{x:Null}">
</Rectangle>
</Grid>