View Issue Details

IDProjectCategoryView StatusLast Update
0003018NoesisGUIUnitypublic2024-01-23 13:56
ReporterJosh Campbell Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status feedbackResolutionopen 
Product Version3.2 
Summary0003018: Collapsed element margins are used in spacing calculation
Description

The description captures pretty much everything.

Steps To Reproduce

Create a stack panel with an icon on the left and some text, give the icon a right margin spacing of 20.
Set the visibility of the button to collapsed.

Spacing on the right of icon will be off.

PlatformAny

Activities

sfernandez

sfernandez

2024-01-18 12:48

manager   ~0009091

Hi,

When an element is Collapsed, all the space used by that element (including its Margin) won't count for the layout. This is how it is intended to work.
What is what you were expecting?

<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<Rectangle Width="80" Margin="0,0,20,0" Visibility="Collapsed"/>
<Rectangle Width="100"/>
</StackPanel>

Previous stack will measure 100px because only the second rectangle is taken into account for the layout, as the first one is collapsed.

Josh Campbell

Josh Campbell

2024-01-18 14:52

reporter   ~0009092

I'm seeing some offset in a textblock that should be collapsed. In blend it renders with the correct spacing but in unity it appears like the margin does not collapse.

sfernandez

sfernandez

2024-01-23 13:56

manager   ~0009108

Could you please attach the xaml corresponding to that piece for me to test?

Issue History

Date Modified Username Field Change
2024-01-17 14:00 Josh Campbell New Issue
2024-01-18 12:48 sfernandez Assigned To => sfernandez
2024-01-18 12:48 sfernandez Status new => feedback
2024-01-18 12:48 sfernandez Note Added: 0009091
2024-01-18 14:52 Josh Campbell Note Added: 0009092
2024-01-18 14:52 Josh Campbell Status feedback => assigned
2024-01-23 13:56 sfernandez Status assigned => feedback
2024-01-23 13:56 sfernandez Note Added: 0009108
2025-10-10 13:29 jsantos Category Unity3D => Unity