Hello guys
I would like to know if something similar to this is possible:
<Clicked> <WhileTrue optionPanel.Visibility="Hidden"> <Set optionPanel.Visibility="Visible" /> </WhileTrue> </Clicked>
I know I could go through JS but don’t know the limit of WhileTrue.
Thanks
Max
This works:
<Clicked>
<Set optionPanel.Visibility="Visible" />
</Clicked>
WhileTrue
will check a value for True/False.
Hi Bjorn, what is unclear for me is -what- WhileTrue will check. Can it check for a property of a ux:Name tagged object (like my example), an observed variable value or what else ?
THank you,
Max
Hi,
if you want an panel to change state based on something then a WhileTrue is good. They will either check it’s own boolean, or a Observable bound to JS.
<StackPanel>
<Button ux:Name="optionPanel">
<Clicked>
<Set ShowOption.Value="true" />
</Clicked>
</Button>
<Button>
<Clicked>
<Set ShowOption.Value="false" />
</Clicked>
</Button>
<WhileTrue ux:Name="ShowOption">
<Change optionPanel.Opacity="0" Duration="2" />
</WhileTrue>
</StackPanel>
Or like this to do changes to your UX based on JS.
<WhileTrue Value="{ShowOption}">
<Change optionPanel.Opacity="0" Duration="2" />
</WhileTrue>