-
September 20th, 2012, 09:23 AM
#1
Array of Controls with Xaml
I've not done much with Xaml, but am using it for a Win8 app I'm building. In a WinForm app, I can easily create an array of controls that I can display. Is there a way to create an array of controls in Xaml? The array makes it much easier to manipulate the controls in looks versus drawing individual controls.
For example, if I wanted to create a 4x4 grid of buttons in an array in a Win8 App, what would be the best approach? Anyone have any sample code of something like this?
Thanks,
Brad!
-
October 1st, 2012, 02:01 AM
#2
Re: Array of Controls with Xaml
In XAML, it's best to do the layouting using one of the layouting controls, such as a Grid, StackPanel, and so on.
So, for a 4x4 grid, you should use the Grid panel.
You can probably (never tried it though) change the number of columns/rows of your Grid control at runtime and insert new controls at runtime.
-
May 29th, 2013, 01:59 PM
#3
Re: Array of Controls with Xaml
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|