Page 1 of 1

Viewbox stretching

Posted: 13 Jan 2022, 19:20
by David Jefferies
I've got a Viewbox that contains a background Path and some collapsed TextBlocks.

When the visibility of the TextBlocks gets changed to Visible the whole control is meant to expand.

This works as expected in Blend but in Noesis (3.1.2) the Viewbox expands but the Path doesn't. If the TextBlocks are initially set to Visible then the Path is expanded as expected.
<Viewbox x:Name="tester" HorizontalAlignment="Left" Height="85" VerticalAlignment="Top" Width="Auto" Margin="74.222,73.707,0,0" RenderTransformOrigin="0.5,0.5">
                    <Grid Width="Auto" Height="85">
                        <Path x:Name="bg_main" Data="F1 M175.994,0 L5,0 C2.25,0 0,2.25 0,5 L0,80 C0,82.75 2.25,85 5,85 L175.994,85 L175.994,0 z" Height="85" VerticalAlignment="Center" Margin="0,0,-35.967,0" Stretch="Fill" Fill="Black"/>
                        <StackPanel x:Name="info_upper" Width="Auto" Orientation="Horizontal" Margin="0,0,-46,0" VerticalAlignment="Top">
                            <TextBlock Height="33" Margin="50,0,20,52" TextWrapping="Wrap" Text="AAAAAAAAA" VerticalAlignment="Center"  RenderTransformOrigin="0.5,0.5" Width="180" TextAlignment="Right" FontSize="36">
                            <TextBlock Height="33" Margin="50,0,20,52" TextWrapping="Wrap" Text="BBBBBBBBB" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Width="180" TextAlignment="Right" Visibility="{Binding Box_Visible, FallbackValue=Collapsed}" FontSize="36">
Here's the result in Blend
blend1.png (7.66 KiB) Viewed 377 times
And this is from Noesis
Noesis1.png (5.92 KiB) Viewed 377 times
Any ideas what's going wrong?

Re: Viewbox stretching

Posted: 14 Jan 2022, 10:54
by sfernandez
This is a bug, I was able to reproduce it in xamltoy, could you please report it in our bugtracker?

Re: Viewbox stretching

Posted: 14 Jan 2022, 11:34
by David Jefferies
thanks for confirming - bug has been submitted