# Using percentages in a StackPanel (original title: 2 minor bugs)

**URL:** <https://forums.fusetools.com/t/using-percentages-in-a-stackpanel-original-title-2-minor-bugs/5161>\
**Category:** How-to Discussions\
**Created:** [July 29, 2016, 4:37pm UTC](https://forums.fusetools.com/t/using-percentages-in-a-stackpanel-original-title-2-minor-bugs/5161 "2016-07-29T16:37:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asaxionis](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@asaxionis](https://forums.fusetools.com/u/asaxionis)\
**Post date:** [July 29, 2016, 4:37pm UTC](https://forums.fusetools.com/t/using-percentages-in-a-stackpanel-original-title-2-minor-bugs/5161/1 "2016-07-29T16:37:55Z")

</div>

I am currently on the latest version of fuse!

So the first one has to do with textinput

```auto
<Rectangle ux:Class="BoxProperties" CornerRadius="25" Width="70%" Height="10%">
        <Stroke Color="#b280b2" />
    </Rectangle>

        <BoxProperties>
            <Circle Height="43%" Width="43%" Alignment="CenterLeft" X="-7%" Y="-.85%">

                <Stroke Color="Black" />
            </Circle>
        <TextInput Alignment="Center" TextColor="#800033" PlaceholderText="Desire Password" Value="{password}" PlaceholderColor="#800033" TextAlignment="Center" IsPassword="true"/>
        </BoxProperties>

```

for some reason when i have isPassword = true, the placeholdertext appears as a password \*\*\*\*\*\*

and then the next has to do with Each

currently in Each you can have a simple case like so

```auto
<StackPanel>
    <Each Count="3">
        <Circle Height="20" Width="20" Color="Red" />
    </Each>
</StackPanel>

```

But when you try to do this in percetanges it does not work

```auto
<StackPanel>
    <Each Count="3">
        <Circle Height="20%" Width="20%" Color="Red" />
    </Each>
</StackPanel>

```

if this could be fixed or implemented that would be fantastic, because it really helps with different platform sizes!

---

<div class="post-metadata">

**Author:** ![asaxionis](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@asaxionis](https://forums.fusetools.com/u/asaxionis)\
**Post date:** [July 29, 2016, 6:56pm UTC](https://forums.fusetools.com/t/using-percentages-in-a-stackpanel-original-title-2-minor-bugs/5161/2 "2016-07-29T18:56:06Z")

</div>

Ahh the first error was on my part, I had a valued stored in the wrong area; but the each bug/feature still applies to the thread!

---

<div class="post-metadata">

**Author:** ![Kristian\_Hasselknipp](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/kristian_hasselknipp/32/549_2.png) [@Kristian\_Hasselknipp](https://forums.fusetools.com/u/Kristian_Hasselknipp)\
**Post date:** [August 1, 2016, 7:44am UTC](https://forums.fusetools.com/t/using-percentages-in-a-stackpanel-original-title-2-minor-bugs/5161/3 "2016-08-01T07:44:16Z")

</div>

Hi!

The problem here is that you are using a StackPanel. A vertical StackPanel (like in this case) has no inherit Height and will size its children to their shortest valid height. So since % is measure in relation to the available space an element is given by its parent, in this case that will be 0. To get the desired effect, use a Grid instead:

```auto
<Grid RowCount="3">
    <Each Count="3">
        <Circle Color="Red" />
    </Each>
</Grid>

```

You can then put height on the Grid instead.
