Click here to Skip to main content
13,091,134 members (64,453 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

6.9K views
1 bookmarked
Posted 22 Jul 2011

Use Expression Blend to Change the Layout Type Efficiently

, 22 Jul 2011
Rate this:
Please Sign up or sign in to vote.
How to use Expression Blend to change the Layout Type efficiently

Many times, we need to change the layout type of any panel present inside the page. This is mainly a designer's job, but sometimes, developers need to change them depending 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 of a tricky process.

In this post, I am going to share with 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 blog, 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 let's 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 from one layout type to another. Thanks for reading this post.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Kunal Chowdhury «IN»
Software Developer (Senior)
India India
Kunal Chowdhury is a Microsoft "Windows Platform Development" MVP (Most Valuable Professional), a Codeproject Mentor, Telerik Developer Expert, Nokia Developer Champion, Windows 10 Champion, Microsoft Rockstar, Speaker in various Microsoft events, Author, passionate Blogger and a Software Engineer by profession.

He is currently working in an MNC located in India. He has a very good skill over XAML, C#, Silverlight, Windows Phone, WPF and Windows Store (WinRT) app development. He posts his findings, articles, tutorials in his technical blog and CodeProject.

Book authored:

Connect with me on:

My CodeProject Awards/Prizes:


You may also be interested in...

Pro
Pro

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170813.1 | Last Updated 22 Jul 2011
Article Copyright 2011 by Kunal Chowdhury «IN»
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid