Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rectangle With Only One Border

Tags:

wpf

I am creating a template for a button. How do I draw only the bottom border of it?

Thanks!

like image 522
Luis Aguilar Avatar asked Sep 23 '11 19:09

Luis Aguilar


People also ask

How do I add border to a rectangle?

1. Open 'Border' from the plugin menu. 2. Select one or more frames. 3. Click button to toggle borders. It's not working! Thank you, Ahmed Mansoor!! It's working! just use it on a frame instead of a shape... To get past "Select one or more frame layers": 1. Right-click the rectagle, click "Create component" OR 2. Select rectangle, Ctrl+Alt+K

Who can see the border on the right side of rectangle?

Only users with topic management privileges can see it. We have a rectangle ,want to give a border of 3 pix only on the right side of the rectangle with the color red.How to achieve this without using custom rectangle as border.

How do I create a border on only one side?

In the meantime, using the “inner shadow” effect can create the appearance of a solid border on only one side of a shape. This is how. Select your rectangle layer and add a new effect from the Effects section in the right-hand sidebar

How to draw a rectangle with only border in Matplotlib?

To draw a rectangle with only border in matplotlib, we can take the following steps− Create a figure and a set of subplots. Get the current axes, creating one if necessary.


2 Answers

<Border BorderThickness="0,0,0,1">
    <!-- Content -->
</Border>

You can set different thickness for any part of Border control.

like image 165
Snowbear Avatar answered Oct 05 '22 06:10

Snowbear


Since you want a dashed line, use a Line object and set it to the bottom of your control

    <Line Stroke="Red" Height="2" Stretch="Fill" X2="1" 
          StrokeDashArray="1 2" VerticalAlignment="Bottom" />

If you don't need the Dashed line, I'd recommend a Border with the BorderThickness property set to 0,0,0,1

like image 36
Rachel Avatar answered Oct 05 '22 07:10

Rachel