Saturday, December 17, 2011

WPF: Draw a 3D Border


The coolest technique to draw a3D border in wps is use a border element as a child element for existing border element.

1)      Create a regular border
2)      Decide on which side you want to show 3D edge
3)      Add another border as its child element, and set its as show in following code.
<Border Height="200" Width="299" BorderThickness="1,26,26,26" BorderBrush="LightBlue">
<Border Height="148" Width="270" BorderThickness="0,1,1,1" BorderBrush="Blue" />
          </Border>
its o/p would be as shown below.




No comments:

Post a Comment