David Jefferies
Topic Author
Posts: 24
Joined: 14 Jan 2021, 17:09

Viewbox stretching

13 Jan 2022, 19:20

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>
                            <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">
                            </TextBlock>
                        </StackPanel>
                    </Grid>
                </Viewbox>
Here's the result in Blend
blend1.png
blend1.png (7.66 KiB) Viewed 513 times
And this is from Noesis
Noesis1.png
Noesis1.png (5.92 KiB) Viewed 513 times
Any ideas what's going wrong?
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: Viewbox stretching

14 Jan 2022, 10:54

This is a bug, I was able to reproduce it in xamltoy, could you please report it in our bugtracker?
 
David Jefferies
Topic Author
Posts: 24
Joined: 14 Jan 2021, 17:09

Re: Viewbox stretching

14 Jan 2022, 11:34

thanks for confirming - bug has been submitted https://www.noesisengine.com/bugs/view.php?id=2240

Who is online

Users browsing this forum: Google [Bot] and 68 guests