Feature Request: XAML Support for Rounded Corners |
Post Reply |
Author | |
tfrancois
Groupie Joined: 21 August 2007 Status: Offline Points: 78 |
Post Options
Thanks(0)
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
tfrancois
Groupie Joined: 21 August 2007 Status: Offline Points: 78 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
tfrancois
Groupie Joined: 21 August 2007 Status: Offline Points: 78 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |