locked
Rectangle Corner Radius (Gear) - 10/2/2007 2:48 PM PST RRS feed

  • Question

  • By: Gear


    Hi,
    
    Is there any way to make just one corner rounded ?
    Seems like we can only make the 4 corner rounded at the same time !
    
    Thursday, February 21, 2008 6:39 PM

Answers

  • By: Brennon Williams

    Howdy,
    
    As Corrado says, the Border element is better suited to your requirement 
    because the border element has a CornerRadius property that you can set each 
    individual corner to a desired radius value as well as setting each side of 
    the border to a value of your choice:
    
    <Border Width="180" Height="180" BorderBrush="#FF949494" 
    BorderThickness="3,6,9,12" CornerRadius="5,10,15,20"/>
    
    
    The other advantage of a border is that it is a content control (only takes 
    one child element), so unlike the rectangle, you can also place other 
    elements inside it!
    
    Hope this helps clarify the element for you.
    
    Cheers
    
    -- 
    Want to learn how to use Blend and visual studio?
    
    http://www.learnexpressionstudio.com
    http://www.expressionblend.com
    http://www.x-coders.com
    
    
    "Gear" wrote:
    
    > Can you explain ?
    > 
    > "Corrado Cavalli [MVP]" wrote:
    > 
    > > Have you considered using a border?
    > > 
    > > -- 
    > > Corrado Cavalli [Microsoft .NET MVP-MCP]
    > > UGIdotNET - http://www.ugidotnet.org
    > > Weblog: http://blogs.ugidotnet.org/corrado/
    > > 
    Thursday, February 21, 2008 11:52 PM

All replies

  • By: Corrado Cavalli [MVP]

    Have you considered using a border?
    
    -- 
    Corrado Cavalli [Microsoft .NET MVP-MCP]
    UGIdotNET - http://www.ugidotnet.org
    Weblog: http://blogs.ugidotnet.org/corrado/
    Thursday, February 21, 2008 11:50 PM
  • By: Gear

    Can you explain ?
    
    "Corrado Cavalli [MVP]" wrote:
    
    > Have you considered using a border?
    > 
    > -- 
    > Corrado Cavalli [Microsoft .NET MVP-MCP]
    > UGIdotNET - http://www.ugidotnet.org
    > Weblog: http://blogs.ugidotnet.org/corrado/
    > 
    Thursday, February 21, 2008 11:51 PM
  • By: Brennon Williams

    Howdy,
    
    As Corrado says, the Border element is better suited to your requirement 
    because the border element has a CornerRadius property that you can set each 
    individual corner to a desired radius value as well as setting each side of 
    the border to a value of your choice:
    
    <Border Width="180" Height="180" BorderBrush="#FF949494" 
    BorderThickness="3,6,9,12" CornerRadius="5,10,15,20"/>
    
    
    The other advantage of a border is that it is a content control (only takes 
    one child element), so unlike the rectangle, you can also place other 
    elements inside it!
    
    Hope this helps clarify the element for you.
    
    Cheers
    
    -- 
    Want to learn how to use Blend and visual studio?
    
    http://www.learnexpressionstudio.com
    http://www.expressionblend.com
    http://www.x-coders.com
    
    
    "Gear" wrote:
    
    > Can you explain ?
    > 
    > "Corrado Cavalli [MVP]" wrote:
    > 
    > > Have you considered using a border?
    > > 
    > > -- 
    > > Corrado Cavalli [Microsoft .NET MVP-MCP]
    > > UGIdotNET - http://www.ugidotnet.org
    > > Weblog: http://blogs.ugidotnet.org/corrado/
    > > 
    Thursday, February 21, 2008 11:52 PM
  • By: Gear

    Thank you
    
    "Brennon Williams" wrote:
    
    > Howdy,
    > 
    > As Corrado says, the Border element is better suited to your requirement 
    > because the border element has a CornerRadius property that you can set each 
    > individual corner to a desired radius value as well as setting each side of 
    > the border to a value of your choice:
    > 
    > <Border Width="180" Height="180" BorderBrush="#FF949494" 
    > BorderThickness="3,6,9,12" CornerRadius="5,10,15,20"/>
    > 
    > 
    > The other advantage of a border is that it is a content control (only takes 
    > one child element), so unlike the rectangle, you can also place other 
    > elements inside it!
    > 
    > Hope this helps clarify the element for you.
    > 
    > Cheers
    > 
    > -- 
    > Want to learn how to use Blend and visual studio?
    > 
    > http://www.learnexpressionstudio.com
    > http://www.expressionblend.com
    > http://www.x-coders.com
    > 
    > 
    > "Gear" wrote:
    > 
    > > Can you explain ?
    > > 
    > > "Corrado Cavalli [MVP]" wrote:
    > > 
    > > > Have you considered using a border?
    > > > 
    > > > -- 
    > > > Corrado Cavalli [Microsoft .NET MVP-MCP]
    > > > UGIdotNET - http://www.ugidotnet.org
    > > > Weblog: http://blogs.ugidotnet.org/corrado/
    > > > 
    Thursday, February 21, 2008 11:53 PM