---
title: "what is the canvas and stackpanel in xaml ?"  
description: "what is the canvas and stackpanel in xaml ?"  
author: "Anurag Sharma"  
published: 2010-11-10  
updated: 2010-11-26  
canonical: https://www.mindstick.com/forum/90/what-is-the-canvas-and-stackpanel-in-xaml  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# what is the canvas and stackpanel in xaml ?

how use it?

## Replies

### Reply by Amit Singh

These are used for layout management in XAML we use 3 container Canvas, StackPanel and Grid\
**Example:**\
\

```
<Canvas Background="Blue">
   <TextBlock Height="50" Width="50" Canvas.Left="15" Canvas.Top="15" />
</Canvas>
```

\
and \
\

```
<StackPanel>
   <TextBlock Height="50" Width="50" />
   <TextBlock Height="50" Width="50" />  
</StackPanel>
```


---

Original Source: https://www.mindstick.com/forum/90/what-is-the-canvas-and-stackpanel-in-xaml

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
