none
GridView in Silverlight 8.1 Phone app RRS feed

  • Question

  • Hi,

    I have a Silverlight for Windows phone app (which I have put a lot into) and thought to put a GridView in it. However, when I create a new project for Windows Phone Silverlight, and try to create a GridView in the .xaml file, GridView is not found. For a Windows Phone app, it works. Please clarify why there is this difference. Is it worth developing a Windows Phone Silverlight app? I seem to keep bumping into things that work for Windows Phone but not Silverlight.

    tx

    Lynn

    Friday, November 7, 2014 11:00 AM

Answers

  • Thank you. However, is Silverlight worth carrying on developing in - I keep noticing difference. Another one - the combobox in Windows Phone is much nicer than Windows Phone Silverlight.

    A thread is a question.

    The idea is you ask a question, mark an answer and or up vote posts you like.

    Other people with similar questions can then find the thread and see which posts you thought helped most.

    That mechanism breaks if you have a bunch of questions in one thread.

    .

    I wouldn't recommend starting a new project in Silverlight now.

    Windows store apps or wpf are the xaml technology to use now.

    I think windows store apps still have a fair way to come in order to get to the usability of Silverlight, let alone wpf.

    Personally.

    I think MS should have taken WPF as a basis for windows store apps.

    As it is, I should think there will be several versions more before you get the same functionality as a WPF developer just takes for granted.

    I have done a fair bit of Silverlight and WPF.

    When I came to work on a windows store app, I was shocked.  Stacks of fundamental things haven't been implemented.

    Anyhow.

    Hope this helps .

    Friday, November 7, 2014 1:54 PM
    Moderator

All replies

  • GridView class

    Minimum supported client
     Windows 8 [Windows Store apps only]


    Minimum supported server
     Windows Server 2012 [Windows Store apps only]


    Minimum supported phone
     Windows Phone 8.1 [Windows Runtime apps only]


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

    Friday, November 7, 2014 12:20 PM
  • The xaml is different for every type of xaml development.

    Silverlight is different to windows store apps and different again from WPF.

    In Silverlight you have the Datagrid in the sdk, which is way better than the gridview.

                    <sdk:DataGrid x:Name="FAQDetailsDG"
    					  AutoGenerateColumns="False"
    					  Margin="0,30,0,0"
                                  HorizontalScrollBarVisibility="Disabled"
    					  ItemsSource="{Binding FAQDetails}">
                        <sdk:DataGrid.RowStyle>
                            <Style TargetType="sdk:DataGridRow" BasedOn="{StaticResource StyledBackColorDatagridRow}" >
                                <Setter Property="Height" Value="Auto" />
                            </Style>
                        </sdk:DataGrid.RowStyle>
                        <sdk:DataGrid.Columns>
                            <sdk:DataGridTextColumn Header="Question" Binding="{Binding fAQDetail.Question}" />
                            <sdk:DataGridTextColumn Header="Video URI" Binding="{Binding fAQDetail.VideoURI}" />
                            <sdk:DataGridTextColumn Header="Article URI" Binding="{Binding fAQDetail.ArticleURI}" />                        
                            <sdk:DataGridTextColumn Header="Deleted" Binding="{Binding Deleted}"  Width="Auto"/>
                            <sdk:DataGridTemplateColumn Width="100">
                                <sdk:DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Button Content="Delete" Command="{Binding DeleteFAQDetail}"/>
                                    </DataTemplate>
                                </sdk:DataGridTemplateColumn.CellTemplate>
                            </sdk:DataGridTemplateColumn>
                        </sdk:DataGrid.Columns>
                    </sdk:DataGrid>

    http://msdn.microsoft.com/en-us/library/cc903946(v=vs.95).aspx

    Or a listbox

    <ListBox x:Name="list" Margin="0" SelectionChanged="list_SelectionChanged">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <toolkit:WrapPanel Orientation="Horizontal"  />
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
        <ListBox.ItemTemplate>
            <DataTemplate>
                <Grid>
                    <!-- content here -->
                </Grid>
            </DataTemplate>
        </ListBox.ItemTemplate>
    </ListBox>
     

    Friday, November 7, 2014 12:54 PM
    Moderator
  • Thank you. However, is Silverlight worth carrying on developing in - I keep noticing difference. Another one - the combobox in Windows Phone is much nicer than Windows Phone Silverlight.
    Friday, November 7, 2014 1:32 PM
  • Another way, you can do it by WrapPanle of Silverlight Toolkit

    WP7 WrapPanel in depth

    Silverlight Toolkit


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

    Friday, November 7, 2014 1:42 PM
  • Thank you. However, is Silverlight worth carrying on developing in - I keep noticing difference. Another one - the combobox in Windows Phone is much nicer than Windows Phone Silverlight.

    A thread is a question.

    The idea is you ask a question, mark an answer and or up vote posts you like.

    Other people with similar questions can then find the thread and see which posts you thought helped most.

    That mechanism breaks if you have a bunch of questions in one thread.

    .

    I wouldn't recommend starting a new project in Silverlight now.

    Windows store apps or wpf are the xaml technology to use now.

    I think windows store apps still have a fair way to come in order to get to the usability of Silverlight, let alone wpf.

    Personally.

    I think MS should have taken WPF as a basis for windows store apps.

    As it is, I should think there will be several versions more before you get the same functionality as a WPF developer just takes for granted.

    I have done a fair bit of Silverlight and WPF.

    When I came to work on a windows store app, I was shocked.  Stacks of fundamental things haven't been implemented.

    Anyhow.

    Hope this helps .

    Friday, November 7, 2014 1:54 PM
    Moderator