---
title: "stackpanel within grid in windows phone does not work"  
description: "stackpanel within grid in windows phone does not work"  
author: "Anonymous User"  
published: 2013-05-18  
updated: 2013-05-18  
canonical: https://www.mindstick.com/forum/910/stackpanel-within-grid-in-windows-phone-does-not-work  
category: "windows phone"  
tags: ["windows phone"]  
reading_time: 2 minutes  

---

# stackpanel within grid in windows phone does not work

Hi Guys\
I tried to do this but I got [message error](https://www.mindstick.com/forum/159641/how-can-i-fix-an-outlook-message-error) : "**ColumnDefinition** does not [support](https://yourviews.mindstick.com/view/286/modi-support-for-sportsperson) [direct](https://yourviews.mindstick.com/view/86744/elon-musk-launch-its-first-direct-to-cell-starlink-satellites) [content](https://www.mindstick.com/articles/13019/get-the-best-content-marketing-pricing-packages-for-your-brand)"\

```
   <Grid>        <Grid.ColumnDefinitions>            <ColumnDefinition Width="229">                <StackPanel Margin="0,0,0,17" Grid.ColumnSpan="2">                    <TextBlock Height="30" Name="l1" Text="first name" />                    <TextBox InputScope="Number" Height="71" Name="firstName" Text="" Width="460" />                </StackPanel>            </ColumnDefinition>            <ColumnDefinition Width="227">                <StackPanel Margin="0,0,0,17" Grid.ColumnSpan="2">                    <TextBlock Height="30" Name="l1" Text="first name" />                    <TextBox InputScope="Number" Height="71" Name="firstName" Text="" Width="460" />                </StackPanel>                                    </ColumnDefinition>        </Grid.ColumnDefinitions>    </Grid>
```

\
**\****Thanks**

## Replies

### Reply by AVADHESH PATEL

Hi Pravesh!\
u cant put the content directly into the column definition, the code should--->\

```
<Grid>            <Grid.ColumnDefinitions>                <ColumnDefinition Width="229"></ColumnDefinition>                            <ColumnDefinition Width="227"></ColumnDefinition>               </Grid.ColumnDefinitions>            <StackPanel Grid.Column="0" Margin="0,0,0,17" Grid.ColumnSpan="2">                        <TextBlock Height="30" Name="l1" Text="first name" />                        <TextBox InputScope="Number" Height="71" Name="firstName" Text="" Width="460" />            </StackPanel>             <StackPanel Grid.Column="1" Margin="0,0,0,17" Grid.ColumnSpan="2">                        <TextBlock Height="30" Name="l1" Text="first name" />                        <TextBox InputScope="Number" Height="71" Name="firstName" Text="" Width="460" />             </StackPanel>       </Grid>
```

\
u can reference the column number, in which the specific content lies by Grid.Column = "nth Column" ex:- Grid.Column = "0"\


---

Original Source: https://www.mindstick.com/forum/910/stackpanel-within-grid-in-windows-phone-does-not-work

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
