![]() |
TrackControl using Markup |
Post Reply ![]() |
Author | |
Xander75 ![]() Senior Member ![]() ![]() Joined: 26 April 2007 Status: Offline Points: 353 |
![]() ![]() ![]() ![]() ![]() Posted: 03 May 2012 at 7:00am |
Hi,
I have been playing around with the Codejock MarkupPad to create a ProgressBar that can be inserted into the Block.Caption within the TrackControl. I have managed to get this to work however I am now stuck because I can't seem to get the length of the Blocks at runtime, the TrackControl is zoomable so therefore the Blocks change length as the control is zoomed. So does anyone know of a way to get a Blocks length when the TrackControl is zoomed in and out? I am setting the ProgressBar width as Block.length but this is then auto zoomed to the best fit by default therefore the width is wrong and unfortunately the Markup won't allow Width='100%' ![]() Any ideas are appreciated!!! ![]() |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
What if you try Width='Auto'?
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
Xander75 ![]() Senior Member ![]() ![]() Joined: 26 April 2007 Status: Offline Points: 353 |
![]() ![]() ![]() ![]() ![]() |
I had tried the Width='Auto' but it didn't work in the approach I had taken, which was using the <Canvas> element.
I have instead opted for a <Grid> element as this allows you to set the <ColumnDefinition Width='100*'></ColumnDefinition> 100* being 100% This has allowed me to get the ProgressBar within the TrackBlock resizing correctly. See screenshot below: ![]() Note: There is a slight discrepancy in the ProgressBar value when zooming. But it's as near as damnit! I will see if I can tighten this up before I upload this version. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
![]() |
|
jpbro ![]() Senior Member ![]() ![]() Joined: 12 January 2007 Status: Offline Points: 1354 |
![]() ![]() ![]() ![]() ![]() |
Hi Xander75,
Glad you got it (mostly) working - maybe one of the progress bars in these threads will work for you 100%?: http://forum.codejock.com/forum_posts.asp?TID=14983&title=markup-user-interface-ideas http://forum.codejock.com/forum_posts.asp?TID=11171&title=com-vb-xaml-progressbar-demo |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
![]() |
|
Xander75 ![]() Senior Member ![]() ![]() Joined: 26 April 2007 Status: Offline Points: 353 |
![]() ![]() ![]() ![]() ![]() |
After some tweaking of the aspect ratio code I have got it working quite well, if anyone can improve upon the zoom ratio code then please feel free to do so.
Here's the code: uploads/2960/TrackControl_Using_Markup.rar Here's the final screenshot: ![]() |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & 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 |