LOST
LOST

Reputation: 3249

How can I get rid of border doubling while stacking two rectangles manually?

I have two rectangles on Canvas, one on top of the other.
The first is located at Y1, the second's height is H and its location is set to Y1 - H. With this configuration I see double-sized border between them. SnapToDevicePixels is true for both rectangles.

How can I rid of this effect?

Upvotes: 1

Views: 124

Answers (1)

Max
Max

Reputation: 153

Get rid of e.g. the upper rectangle's lower border like this:

BorderThickness="1,1,1,0"

(or -vice-versa, the lower rectangle's upper border)

Upvotes: 2

Related Questions