Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User NujnaH's Avatar
    Join Date
    Nov 2011
    Posts
    4
    Hey guys, first post here.
    I'm making an application for Windows Phone 7, and in my main view, I'm trying to create a list, but with two columns, showing the same data. So instead of the data going straight down, it goes sideways, then down. Is this possible?

  2. #2
    Nokia Developer Administrator hamishwillee's Avatar
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    1,898
    Can you add a mockup of what you're trying to do?

  3. #3
    Registered User sreerajvr's Avatar
    Join Date
    Oct 2010
    Location
    Trivandrum ,Kerala
    Posts
    135
    Please refer the following XAML code

    <Grid >
    <Grid.RowDefinitions>
    <RowDefinition Height="50"></RowDefinition>
    <RowDefinition Height="50"></RowDefinition>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="100"></ColumnDefinition>
    <ColumnDefinition Width="100"></ColumnDefinition>
    </Grid.ColumnDefinitions>
    <Button Content="Text" Grid.Row="0" Grid.Column="0"></Button>
    <Rectangle Fill="Blue" Grid.Row="0" Grid.Column="1"></Rectangle>
    </Grid>
    sreerajvr

  4. #4
    Registered User Popple3's Avatar
    Join Date
    Oct 2011
    Posts
    8
    You can also use a WrapPanel from the WP Silverlight Toolkit that you can download from http://silverlight.codeplex.com/

  5. #5
    Registered User NujnaH's Avatar
    Join Date
    Nov 2011
    Posts
    4
    Thanks for the responses! I'm not sure if the Grid definitions will work though. So basically, I want a list of images. Say they are images 1, 2, 3 ... 10. Normal list view would show them as
    1
    2
    3
    4
    ...
    10

    But I want
    1 2
    3 4
    ....
    9 10. Would a wrap panel accomplish this?

  6. #6
    Registered User Popple3's Avatar
    Join Date
    Oct 2011
    Posts
    8
    Quote Originally Posted by NujnaH View Post
    Thanks for the responses! I'm not sure if the Grid definitions will work though. So basically, I want a list of images. Say they are images 1, 2, 3 ... 10. Normal list view would show them as
    1
    2
    3
    4
    ...
    10

    But I want
    1 2
    3 4
    ....
    9 10. Would a wrap panel accomplish this?
    Yeah, it should. A wrap panel will fit as much as it can horizontally, before going to a new line. So if you set the width of your StackPanel (or whatever you're using for each list item) to the right size, you'll get two columns working nicely.

  7. #7
    Registered User NujnaH's Avatar
    Join Date
    Nov 2011
    Posts
    4
    Quote Originally Posted by Popple3 View Post
    Yeah, it should. A wrap panel will fit as much as it can horizontally, before going to a new line. So if you set the width of your StackPanel (or whatever you're using for each list item) to the right size, you'll get two columns working nicely.
    sweet, i'll try that out tonight. thanks

  8. #8
    Registered User sreerajvr's Avatar
    Join Date
    Oct 2010
    Location
    Trivandrum ,Kerala
    Posts
    135
    You can also use attached Properties of XAML
    eg: you can set the value of Grid.Column on a button/images assigned to a button variable as follows

    Grid.SetColumn(button, 1);
    sreerajvr

  9. #9
    Registered User NujnaH's Avatar
    Join Date
    Nov 2011
    Posts
    4
    i ended up using a wrap panel. it worked out really nicely. i hope my app gets published now

Similar Threads

  1. changing listbox column layout
    By decryptor in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-06-24, 07:48
  2. listbox and column length
    By jack44 in forum Symbian User Interface
    Replies: 2
    Last Post: 2004-12-09, 11:50
  3. How to change the row height in column listbox?
    By khanming in forum Symbian User Interface
    Replies: 3
    Last Post: 2003-03-11, 12:49
  4. Column listbox with Headings
    By mark_williams in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-02-26, 02:51
  5. Icon in column listbox does not appear
    By khanming in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-06-26, 12:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved