Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Feature Request: XAML Support for Rounded Corners
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Feature Request: XAML Support for Rounded Corners

 Post Reply Post Reply
Author
Message
tfrancois View Drop Down
Groupie
Groupie


Joined: 21 August 2007
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrancois Quote  Post ReplyReply Direct Link To This Post Topic: Feature Request: XAML Support for Rounded Corners
    Posted: 27 July 2010 at 12:57pm
I noticed that in some places there seems be support for rounded edges for the Border tag in XAML via the CornerRadius attribute.  Is there any way CJ could add support for this to the list of available XAML tags already available?  It doesn't seem that complex and I would love to be able to have rounded edges on some of my rectangles.

Please advise.  Thank you.  And when can we expect another beta or release?  It's been a while since we've heard anything about either...
     Product: Xtreme SuitePro (ActiveX) version 15.0.2
     Platform: Windows XP (32bit) - SP 3
     Language: Visual Basic 6.0 SP6
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2010 at 2:23pm
The Rectangle tag supports the RadiusX and RadiusY attributes. If you set them to the same values, you can get rounded corners. If you set them differently (especially with higher values), you can get some unusual shapes.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
tfrancois View Drop Down
Groupie
Groupie


Joined: 21 August 2007
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrancois Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2010 at 2:50pm
Really?!  I wasn't aware that it did because it was not mentioned anywhere in the documentation or help files!  I am having trouble implementing it...can you give me an example on how it is used or what the proper syntax is.  Any help would be GREATLY appreciated.

Here is the XAML code I am currently working with: 

<Border VerticalAlignment='Center' HorizontalAlignment='Center' Padding='2' BorderThickness='1' Width='186px' Height='102px' BorderBrush='#767676' MaxWidth='240'><Border.Background><LinearGradientBrush StartPoint='0, 0' EndPoint='0,1'><GradientStop Color='#ffffff' Offset='0'/><GradientStop Color='#c9d9ef' Offset='1'/></LinearGradientBrush></Border.Background><StackPanel TextBlock.FontFamily='Tahoma'><TextBlock Padding='6, 3, 1, 2' FontWeight='Bold'>Header Text</TextBlock><TextBlock Padding='13, 0, 5, 4' TextWrapping='Wrap' FontSize='8pt'>BodyText</TextBlock><Border Height='1' Background='#9ebbdd' /><Border Height='1' Background='White' /><StackPanel Margin='1, 4, 0, 3' Orientation='Horizontal'><TextBlock Margin='3, 0, 0, 0' VerticalAlignment='Top' Foreground='#575757'>Footnote</TextBlock></StackPanel></StackPanel></Border>

I simply would like to have rounded corners on the outer rectangle/border of the box.
     Product: Xtreme SuitePro (ActiveX) version 15.0.2
     Platform: Windows XP (32bit) - SP 3
     Language: Visual Basic 6.0 SP6
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2010 at 3:03pm
I actually only discovered this RadiusX and RadiusY properties of the rectangle by looking at the Shapes.xaml sample that ships with the suite (in the Utils\Markups folder where you installed the Suite).

However, since you are using the Border tag instead of the Rectangle, you should use the CornerRadius attribute. For example:

<Border CornerRadius='15' VerticalAlignment='Center' HorizontalAlignment='Center' Padding='2' BorderThickness='1' Width='186px' Height='102px' BorderBrush='#767676' MaxWidth='240'><Border.Background><LinearGradientBrush StartPoint='0, 0' EndPoint='0,1'><GradientStop Color='#ffffff' Offset='0'/><GradientStop Color='#c9d9ef' Offset='1'/></LinearGradientBrush></Border.Background><StackPanel TextBlock.FontFamily='Tahoma'><TextBlock Padding='6, 3, 1, 2' FontWeight='Bold'>Header Text</TextBlock><TextBlock Padding='13, 0, 5, 4' TextWrapping='Wrap' FontSize='8pt'>BodyText</TextBlock><Border Height='1' Background='#9ebbdd' /><Border Height='1' Background='White' /><StackPanel Margin='1, 4, 0, 3' Orientation='Horizontal'><TextBlock Margin='3, 0, 0, 0' VerticalAlignment='Top' Foreground='#575757'>Footnote</TextBlock></StackPanel></StackPanel></Border>

Produces this output:

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
tfrancois View Drop Down
Groupie
Groupie


Joined: 21 August 2007
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrancois Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2010 at 3:09pm
I'm telling you...Codejock has revolutionized, re-energized, and given me real motivation and reason to continue to develop in VB6.  I hope they continue to support this platform as there are MANY of us that depend on their controls for sustainability in the new development landscape. 

Thank you for your help with this!  I'm happy as a clam right now... LOL
     Product: Xtreme SuitePro (ActiveX) version 15.0.2
     Platform: Windows XP (32bit) - SP 3
     Language: Visual Basic 6.0 SP6
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 28 July 2010 at 11:29am
I'm glad! Markup is really fantastic, and with only a few improvements that have been requested it will be a remarkably powerful tool.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.