# Whiletrue check

**URL:** <https://forums.fusetools.com/t/whiletrue-check/6956>\
**Category:** General\
**Created:** [December 19, 2015, 4:50pm UTC](https://forums.fusetools.com/t/whiletrue-check/6956 "2015-12-19T16:50:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![massimiliano.aronica](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@massimiliano.aronica](https://forums.fusetools.com/u/massimiliano.aronica)\
**Post date:** [December 19, 2015, 4:50pm UTC](https://forums.fusetools.com/t/whiletrue-check/6956/1 "2015-12-19T16:50:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bjorn-Olav\_Strand](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bjorn-olav_strand/32/583_2.png) [@Bjorn-Olav\_Strand](https://forums.fusetools.com/u/Bjorn-Olav_Strand)\
**Post date:** [December 20, 2015, 9:34am UTC](https://forums.fusetools.com/t/whiletrue-check/6956/2 "2015-12-20T09:34:12Z")

</div>

This works:

```auto
<Clicked>
    <Set optionPanel.Visibility="Visible" />
</Clicked>

```

`WhileTrue` will check a value for True/False.

---

<div class="post-metadata">

**Author:** ![massimiliano.aronica](https://avatars.discourse-cdn.com/v4/letter/m/b5ac83/32.png) [@massimiliano.aronica](https://forums.fusetools.com/u/massimiliano.aronica)\
**Post date:** [December 20, 2015, 10:10am UTC](https://forums.fusetools.com/t/whiletrue-check/6956/3 "2015-12-20T10:10:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bjorn-Olav\_Strand](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bjorn-olav_strand/32/583_2.png) [@Bjorn-Olav\_Strand](https://forums.fusetools.com/u/Bjorn-Olav_Strand)\
**Post date:** [December 20, 2015, 12:16pm UTC](https://forums.fusetools.com/t/whiletrue-check/6956/4 "2015-12-20T12:16:17Z")

</div>

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.

```auto
    <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.

```auto
        <WhileTrue Value="{ShowOption}">
            <Change optionPanel.Opacity="0" Duration="2" />
        </WhileTrue>

```
