Page 1 of 1

Request: FlowDirection (StackPanel, WrapPanel)

Posted: 05 Jan 2019, 17:09
by GeorgeR
I'm back to working on the UI for my game and the one missing feature I can't find an alternative for is FlowDirection support for both StackPanel and WrapPanel. Is this on the cards?

Re: Request: FlowDirection (StackPanel, WrapPanel)

Posted: 08 Jan 2019, 01:58
by sfernandez
Unfortunately this property is not yet implemented and is not going to be ready for 2.2 version.
The issue is already reported:
We will work on this for the next version.

Re: Request: FlowDirection (StackPanel, WrapPanel)

Posted: 05 Mar 2020, 12:47
by jinfox

I am sorry to dig this post back up but has this been implemented? It does not seem to be working on Noesis (whereas Blend seem to understand it correctly)

Here is a sample of code that I was trying to make work :
<DockPanel FlowDirection="LeftToRight">
        <Grid Name="PortraitZone" Background="Blue" Width="400" HorizontalAlignment="Left" />

        <Grid Name="SpeechBubble" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="56,0,0,0" >
            <Path Data="M0,256 L256,0 256,226 z" Fill="#CCFFFFFF" Height="56" Stretch="Fill" Width="56.1" HorizontalAlignment="Left" Margin="-56,0,0,0" />
            <Border Background="#CAFFFFFF" Padding="50" CornerRadius="30" MinWidth="300" >
                <TextBlock FontSize="36" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,20,50,0" Text="TEXT" />

In this example, in blend, By just switching "LeftToRight" to "RightToLeft", the speech bubble is automatically scale negatively in Y (very convenient) and the layout is inverted. Doing the same without FlowDirection would require a lot of trigger or different templates to achieve the same result.

Re: Request: FlowDirection (StackPanel, WrapPanel)

Posted: 12 Mar 2020, 20:47
by sfernandez
Sorry to say it is not implemented yet.

Would it be possible to just use 2 templates (left-to-right, right-to-left) and select the corresponding one?

Re: Request: FlowDirection (StackPanel, WrapPanel)

Posted: 15 Oct 2020, 12:17
by Noa3

Same for me, 3.0.6 Still not implemented.
i want to push this a bit.

a workaorund for me was to use a Dockpanel with LastChildFill="False" and then the elements with the tag DockPanel.Dock="Right". for the people who are watching for an alternative

Re: Request: FlowDirection (StackPanel, WrapPanel)

Posted: 19 Oct 2020, 17:35
by sfernandez
I have added FlowDirection issue #615 to 3.1 roadmap.

This feature requests a lot of changes to layout code and panels, but we will try to have it ready for that version.

Re: Request: FlowDirection (StackPanel, WrapPanel)

Posted: 21 Oct 2020, 16:43
by Noa3
thank you very much for your effort!