Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Links labels bounds. (Read 2451 times)
skaladra
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Sep 28th, 2022
Links labels bounds.
Oct 18th, 2022 at 10:07am
Print Post  
Hello support. I am working with links labels and Link text property as well. It seems like link label bounding box already has some padding added, because the box is larger than link text property even with it's padding set to zero. I've added an attachment where top text item is link text property, and the bottom is link label. Do you have a solution for this?
  

LinkLabelBounds.png ( 5 KB | 118 Downloads )
LinkLabelBounds.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: Links labels bounds.
Reply #1 - Oct 18th, 2022 at 10:23am
Print Post  
Hi,

Check if that's not coming from the Margin property. ItemLabel sets its default value to 2:

Code
Select All
MarginProperty.OverrideMetadata(
	typeof(ItemLabel),
	new FrameworkPropertyMetadata(new Thickness(2)));
 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
skaladra
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Sep 28th, 2022
Re: Links labels bounds.
Reply #2 - Oct 18th, 2022 at 11:04am
Print Post  
Unfortunately, no. It seems like margin just moves the label. The first picture is label with zero margin (0, 0, 0, 0) and the second is label with margin set to 30 (30, 30, 30, 30).
  

ZeroMargin.png ( 4 KB | 111 Downloads )
ZeroMargin.png
ThirtyMargin.png ( 6 KB | 107 Downloads )
ThirtyMargin.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: Links labels bounds.
Reply #3 - Oct 18th, 2022 at 1:16pm
Print Post  
Right, it's hard-coded padding when you set Brush for background. This build lets you change it using TextPadding property:

https://mindfusion.eu/_beta/wpfdiag383.zip

Code
Select All
label.TextPadding = new Thickness(0); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
skaladra
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Sep 28th, 2022
Re: Links labels bounds.
Reply #4 - Oct 18th, 2022 at 1:43pm
Print Post  
It seems like text padding doesn't affect the label background. I have 3.8.3 as well and if I set any padding (let it be 20 or 0), the actual background size isn't changing.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: Links labels bounds.
Reply #5 - Oct 18th, 2022 at 3:38pm
Print Post  
TextPadding should affect it with new build our developer created today; have you downloaded again or using older preview assemblies?
  
Back to top
 
IP Logged
 
skaladra
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Sep 28th, 2022
Re: Links labels bounds.
Reply #6 - Oct 19th, 2022 at 4:11am
Print Post  
I used older versions. Thank you, I'll try the newest solution.
  
Back to top
 
IP Logged
 
skaladra
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Sep 28th, 2022
Re: Links labels bounds.
Reply #7 - Oct 19th, 2022 at 4:22am
Print Post  
Yeah, now setting text padding works perfectly. Thank you so much.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint