Follow us on X (Twitter)  Like us on Facebook  Connect with us on LinkedIn  Subscribe to our YouTube Channel  Subscribe to our WhatsApp Group

Many time we need to change the layout type of any panel present inside the page. This is mainly a designers job but sometime developers need to change them on their requirement. In that case, people need to find out the start and end tag of the panel and change them accordingly. This is little bit a tricky process.


In this post, I am going to share you the easy process to switch between different layout types. If you are a designer or using Expression Blend, you are already familiar with it. But for a newbie, I think it will be a great help.


Here in this tips & trick, I will just show you the technique of changing the layout type of any layout present in your XAML page using the Expression Blend. This will help you in various scenarios if you are not already familiar with that.


For example, the below code has a Grid layout inside the XAML page. We will now use blend to change it to a canvas layout. If you want to change it to a different type, you can do that very easily. Let's see the below XAML code:


Initial Grid Control as Layout Root


Now lets open the page in Expression Blend. In the "Object and Timeline" panel (as shown below), find the layout that you want to convert. Right click on it and from the popup menu click on the submenu called "Change Layout Type". This will open up another submenu where all the layout types will be listed. Click the desired layout panel to convert the selected panel.


Changing the Layout Type using Expression Blend



In our case, we are going to chose the "Canvas" as new layout type as shown in the above screenshot. Now in the XAML, you will notice that the Grid layout has been changed to Canvas layout as shown in the below figure:


Grid Control changed as Canvas


Hope this tip was helpful for you to understand the trick. You will find it useful when you have a long XAML page and there you want to change between one layout type to another. Thanks for reading this post.

Have a question? Or, a comment? Let's Discuss it below...


Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.