This repository was archived by the owner on May 1, 2024. It is now read-only.
Is it possible to use a StateLayout in another StateLayout? #1755
Answered
by
LeoJHarris
themronion
asked this question in
Q&A
-
Hi, i am wondering whether it is possible to do something like this - <StackLayout Padding="10" xct:StateLayout.CurrentState="{Binding CurrentState}" xct:StateLayout.CurrentCustomStateKey="{Binding CustomState}">
<xct:StateLayout.StateViews>
<xct:StateView StateKey="Custom" CustomStateKey="ThisIsACustomState">
<Label Text="Hi, I'm a custom state!" />
</xct:StateView>
<xct:StateView StateKey="Custom" CustomStateKey="ThisIsACustomStateToo">
<Label Text="Hi, I'm a custom state too!" />
<StackLayout xct:StateLayout.CurrentState="{Binding CurrentState}" xct:StateLayout.CurrentCustomStateKey="{Binding CustomState2}">
<xct:StateLayout.StateViews>
<xct:StateView StateKey="Custom" CustomStateKey="ThisIsACustomState2">
<Label Text="Hi, I'm a custom state inside other custom state" />
</xct:StateView>
<xct:StateView StateKey="Custom" CustomStateKey="ThisIsACustomStateToo2">
<Label Text="Hi, I'm a custom state inside other custom state too!" />
</xct:StateView>
</xct:StateLayout.StateViews>
</StackLayout>
</xct:StateView>
</xct:StateLayout.StateViews>
<Label Text="This is the normal state." />
</StackLayout> I was trying to achieve this but the second state displays two state at the same time. Are there any tweaks to achieve this or its not possible with the current implementation? @sthewissen |
Beta Was this translation helpful? Give feedback.
Answered by
LeoJHarris
Dec 6, 2021
Replies: 1 comment 1 reply
-
@themronion tried using a ControlTemplate instead inside that First StateLayout? That being said I have been able to put StateLayout inside other StateLayouts |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
themronion
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@themronion tried using a ControlTemplate instead inside that First StateLayout? That being said I have been able to put StateLayout inside other StateLayouts