View Issue Details

IDProjectCategoryView StatusLast Update
0002054NoesisGUIUnitypublic2021-07-01 10:19
Reportersaarix Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status assignedResolutionopen 
Product Version3.0.12 
Target Version3.1 
Summary0002054: Binding to ActualWidth property returns 0 at runtime
Description

I was trying to bind a grids width property to its child elements ActualWidth to control size. But it is always set to 0, even tho the actual width of the child is correct in the inspector.
This solution works fine in WPF, but breaks in Unity.

As described in my forum post: https://www.noesisengine.com/forums/viewtopic.php?f=3&t=2346&p=12942#p12942

Steps To Reproduce

The issue should always happen with this code:

<DockPanel>
<Control Template="{StaticResource IconPlus}" Width="120" Height="120" DockPanel.Dock="Left" Panel.ZIndex="1" />
<Control Template="{StaticResource IconCoin}" Width="120" Height="120" DockPanel.Dock="Right" Panel.ZIndex="1" />
<Grid Width="{Binding Path=ActualWidth, ElementName=CoinsAmount, UpdateSourceTrigger=PropertyChanged}">
<Control Template="{StaticResource DarkPanelBackground}" Margin="-45, 40, -60, 40" />
<TextBlock x:Name="CoinsAmount" Text="8 547" FontSize="36" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
</Grid>
</DockPanel>

PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-06-29 13:12 saarix New Issue
2021-06-29 13:12 saarix Tag Attached: C#
2021-06-29 13:12 saarix Tag Attached: Unity
2021-07-01 10:19 sfernandez Assigned To => sfernandez
2021-07-01 10:19 sfernandez Status new => assigned
2021-07-01 10:19 sfernandez Product Version => 3.0.12
2021-07-01 10:19 sfernandez Target Version => 3.1
2025-10-10 13:29 jsantos Category Unity3D => Unity