Print Page | Close Window

Feature Request: XAML Support for Rounded Corners

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=17011
Printed Date: 05 October 2024 at 9:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Feature Request: XAML Support for Rounded Corners
Posted By: tfrancois
Subject: Feature Request: XAML Support for Rounded Corners
Date 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



Replies:
Posted By: jpbro
Date 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



Posted By: tfrancois
Date 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


Posted By: jpbro
Date 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



Posted By: tfrancois
Date 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


Posted By: jpbro
Date 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net