Array of Controls with Xaml
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Array of Controls with Xaml

  1. #1
    Join Date
    Sep 2000
    Location
    Indianapolis
    Posts
    6,439

    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!

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,062

    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.

  3. #3
    Join Date
    May 2013
    Posts
    12

    Re: Array of Controls with Xaml

    How to use array in Java

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center