WPF rectangle – round just top corners

The problem you’ve got is that the rectangle is “overflowing” the rounded corners of your border. A rectangle can’t have individually rounded corners, so if you just put the background colour on the border and remove the rectangle: <Border BorderThickness=”1″ Grid.Row=”0″ Grid.ColumnSpan=”2″ CornerRadius=”50,50,0,0″ BorderBrush=”Black” Background=”#FF5A9AE0″> </Border> You’ll get your desired effect.

Rounded Button in Android

You can do a rounded corner button without resorting to an ImageView. A background selector resource, button_background.xml: <?xml version=”1.0″ encoding=”utf-8″ ?> <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <!– Non focused states –> <item android:state_focused=”false” android:state_selected=”false” android:state_pressed=”false” android:drawable=”@drawable/button_unfocused” /> <item android:state_focused=”false” android:state_selected=”true” android:state_pressed=”false” android:drawable=”@drawable/button_unfocused” /> <!– Focused states –> <item android:state_focused=”true” android:state_selected=”false” android:state_pressed=”false” android:drawable=”@drawable/button_focus” /> <item android:state_focused=”true” android:state_selected=”true” android:state_pressed=”false” android:drawable=”@drawable/button_focus” … Read more

How to set layer cornerRadius for only bottom-left, bottom-right, and top-left corner?

(swift 4/iOS 11) Just simply say for bottom: yourView.clipsToBounds = true yourView.layer.cornerRadius = 10 yourView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMinXMaxYCorner] for Up: yourView.clipsToBounds = true yourView.layer.cornerRadius = 10 yourView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMinXMinYCorner] in your case: yourView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner] Hope this help 🙂

Round two corners in UIView

CACornerMask introduced in iOS 11, which help to define topleft, topright, bottomleft, bottom right in view layer. Below is example to use. Here I try to rounded only two top corner: myView.clipsToBounds = true myView.layer.cornerRadius = 10 myView.layer.maskedCorners = [.layerMinXMinYCorner,.layerMaxXMinYCorner] FYI Ref:

Rounded table corners CSS only

Seems to work fine in FF and Chrome (haven’t tested any others) with separate borders: http://jsfiddle.net/7veZQ/3/ Edit: Here’s a relatively clean implementation of your sketch: table { border-collapse:separate; border:solid black 1px; border-radius:6px; } td, th { border-left:solid black 1px; border-top:solid black 1px; } th { background-color: blue; border-top: none; } td:first-child, th:first-child { border-left: none; … Read more

How to programmatically round corners and set random background colors

Instead of setBackgroundColor, retrieve the background drawable and set its color: v.setBackgroundResource(R.drawable.tags_rounded_corners); GradientDrawable drawable = (GradientDrawable) v.getBackground(); if (i % 2 == 0) { drawable.setColor(Color.RED); } else { drawable.setColor(Color.BLUE); } Also, you can define the padding within your tags_rounded_corners.xml: <?xml version=”1.0″ encoding=”utf-8″?> <shape xmlns:android=”http://schemas.android.com/apk/res/android”> <corners android:radius=”4dp” /> <padding android:top=”2dp” android:left=”2dp” android:bottom=”2dp” android:right=”2dp” /> </shape>

How do I create a round cornered UILabel on the iPhone?

iOS 3.0 and later iPhone OS 3.0 and later supports the cornerRadius property on the CALayer class. Every view has a CALayer instance that you can manipulate. This means you can get rounded corners in one line: view.layer.cornerRadius = 8; You will need to #import <QuartzCore/QuartzCore.h> and link to the QuartzCore framework to get access … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)