locked
gridview in metro style app RRS feed

  • Question

  • hi,

    I am trying to develop an grid view same as the windows8 preview start view. where using all properties of the grid view.Can anyone have idea about this...I trying to develop same as win8 with image as items..Please help me sir..

    Regards ,

    sarath s

    Tuesday, August 14, 2012 12:31 PM

All replies

  • Hello Sarath,

    I'm not sure that I understand what you are asking. Do you have a specific question about how to use the GridView API? You can set the content of each GridViewItem that you specify. The GridViewItem's content can be a custom or inbox control derived from ContentControl.

    GridViewItem class
    http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.gridview.aspx

    ContentControl.Content property
    http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.contentcontrol.content.aspx

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 15, 2012 12:58 AM
    Moderator
  • hi,

    I am developed a gridview .But the problem is when I am trying to dragging one item to the adjescent item  there is no movement of item to the dragging item . We can see this effect on the Win8 start Gridview of application . I am trying to implement this effect on my app . Please help me if anyone have any idea about this problem.

    Regards,

    Sarath s

    Wednesday, August 15, 2012 4:11 AM
  • Hello,

    There is a property, you should set it as true.
     
    gridView1->CanDragItems=true;

    OR

    <listViewBase CanDragItems="bool" />

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.listviewbase.candragitems.aspx

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, August 15, 2012 5:50 AM
  • Hello,

    AllowDrop

    ="True" CanDragItems="True" CanReorderItems="True". I am setted these properties of the grid view .But actual problem is there is no movement of the images to the position of the holding item while the item is in dragging. We can see this effect on the Win8 start window with all applications which is in a grid view. Please help me.
    Wednesday, August 15, 2012 6:04 AM
  • Hello Sarath,

    You said: "But actual problem is there is no movement of the images to the position of the holding item while the item is in dragging." I apologize but it is still not clear what you are asking. Is the problem that you are not able to drop the item in a new position? Can you provide screen shots of a working and non working scenario?

    -James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, August 15, 2012 11:09 PM
    Moderator
  • hi james,

    In grid view there is an effect of moving the items to the portion of adjescent item when we are select the adjescent image from the grid view for Dragging.We can see it in the WIN8 main window with gridview . Actually this is the problem.I am trying to implement that..please help me.my code as follows.

    <GridView x:Name="gridview" Grid.Row="1" AllowDrop="True" CanDragItems="True" ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.HorizontalScrollMode="Disabled" Grid.ColumnSpan="2" CanReorderItems="True">

    <GridView.Background>

    <SolidColorBrush Color="Black" Opacity="0.2"/>

    </GridView.Background>

    <GridView.ItemsPanel>

    <ItemsPanelTemplate>

    <WrapGrid Orientation="Horizontal"/>

    </ItemsPanelTemplate>

    </GridView.ItemsPanel><Image Source="Assets/Logo.png"/><Image Source="Assets/SmallLogo.png"/>  </GridView>              

    Thursday, August 16, 2012 4:27 AM
  • Hello Sarath,

    Thank you very much for sending your XAML. After adding your markup to a simple app I see the expected behavior. I do not see any problems with dragging or dropping the items. I must not understand your exact steps to reproduce the problem. Can you please give me the exact steps to reproduce the problem. Screen shots or a video would be extremely helpful. You can upload these items to your SkyDrive account.

    Thanks,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, August 16, 2012 10:25 PM
    Moderator
  • Hi James,

    I have the same issue as Sarath.  Using the XAML above, you can select/drag GridView items using the mouse.  But you cannot select/drag GridView items using Touch.  Is this a bug in the OS?  Is there a workaround to make GridView item select/drag work using Touch?

    I'm using Win8 build 9200.

    Thanks, Russell


    • Edited by RussellDev Monday, September 24, 2012 4:26 PM
    Monday, September 24, 2012 4:25 PM