i'm trying to make a textbox with round corners, the problem is that i can't make them perfectly because of the WPF implicit antialiasing, is there a way to do this perfectly? maybe drop a shadow or a outer glow or something?
<Border ... BorderThickness="1,1,1,1" CornerRadius="11,11,11,11">
<TextBox ... />
</Border>
the result:

-
-
Buy a vector monitor?
Seriously, the anti-aliasing is your best bet for making corners that appear to be round. Think about it - at the lowest level if you had a black and white monitor all you could do was turn pixels on and off. Your screen is made up of millions of these pixels, and they're organized as squares in a grid. The fact that your monitor can show more than black and white allows you to display various shades of black around a curve to make it look like a curve. Yes, when you magnify it it's not going to look right, but with 1-1 viewing, it's the best you can do.
Unless you have a vector monitor.
Check out the wikipedia site on anti-aliasing for more info. -
Maybe I'm just being silly but does it matter?
I can't tell the corners on the zoomed out one aren't perfect. Presumably noone will be running this zoomed in that far? -
yeah its not the zoomed part, just look at the normal zoom still its not rightGoddersUK wrote:Maybe I'm just being silly but does it matter?
I can't tell the corners on the zoomed out one aren't perfect. Presumably noone will be running this zoomed in that far?
-
Ion Todirel wrote: yeah its not the zoomed part, just look at the normal zoom still its not right
Looks fine to me.
-
It... looks perfectly fine.

-
i worked around BorderThickness, and looks a little better now
changed 1,1,1,1 to 1.3,1,1,1.3
almost ideal
here is the whole xaml:
<Border xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
HorizontalAlignment="Left"
Margin="45,187,0,0"
VerticalAlignment="Top"
Width="157"
Height="22"
BorderBrush="#A6B4C3"
BorderThickness="1.3,1,1,1.3"
CornerRadius="11,11,11,11" Background="#FFFFFFFF">
<TextBox Margin="6,1,6,1" FontSize="12" BorderThickness="0,0,0,0"/>
</Border> -
Close enough in my opinion.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.