Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ted LongListSelector这不是一个推荐的UI场景,我现在脑子里没有最优的解决方案,但我建议你将页面分成两部分,一部分显示游戏标题,另一部分显示选择屏幕截图。谢谢你的解释。该死的,我发现这不起作用。在一些图像中,我的应用程序崩溃,我收到以下错_C#_Xml_Image_Windows Phone 8_Binding - Fatal编程技术网

C# ted LongListSelector这不是一个推荐的UI场景,我现在脑子里没有最优的解决方案,但我建议你将页面分成两部分,一部分显示游戏标题,另一部分显示选择屏幕截图。谢谢你的解释。该死的,我发现这不起作用。在一些图像中,我的应用程序崩溃,我收到以下错

C# ted LongListSelector这不是一个推荐的UI场景,我现在脑子里没有最优的解决方案,但我建议你将页面分成两部分,一部分显示游戏标题,另一部分显示选择屏幕截图。谢谢你的解释。该死的,我发现这不起作用。在一些图像中,我的应用程序崩溃,我收到以下错,c#,xml,image,windows-phone-8,binding,C#,Xml,Image,Windows Phone 8,Binding,ted LongListSelector这不是一个推荐的UI场景,我现在脑子里没有最优的解决方案,但我建议你将页面分成两部分,一部分显示游戏标题,另一部分显示选择屏幕截图。谢谢你的解释。该死的,我发现这不起作用。在一些图像中,我的应用程序崩溃,我收到以下错误消息:检测到布局周期。布局无法完成:/ <phone:PivotItem Header="Images"> <Grid> <phone:LongListSelector LayoutMod


ted LongListSelector这不是一个推荐的UI场景,我现在脑子里没有最优的解决方案,但我建议你将页面分成两部分,一部分显示游戏标题,另一部分显示选择屏幕截图。谢谢你的解释。该死的,我发现这不起作用。在一些图像中,我的应用程序崩溃,我收到以下错误消息:检测到布局周期。布局无法完成:/
<phone:PivotItem Header="Images">
    <Grid>
        <phone:LongListSelector LayoutMode="Grid" IsGroupingEnabled="True" GridCellSize="180,180" Margin="0,0,-12,0" ItemsSource="{Binding}">
        <phone:LongListSelector.ItemTemplate>
            <DataTemplate>
                <Grid Background="{StaticResource PhoneAccentBrush}" Margin="5">
                    <StackPanel>
                            <Image Source="{Binding Images}"></Image>
                    </StackPanel>
                </Grid>
            </DataTemplate>
        </phone:LongListSelector.ItemTemplate>
        </phone:LongListSelector>
    </Grid>
</phone:PivotItem>
this.DataContext = gd.GetGameItems;
 private ObservableCollection<GetGame> _GetGameItems = new ObservableCollection<GetGame>();
    public ObservableCollection<GetGame> GetGameItems
    {
        get
        {
            return this._GetGameItems;
        }
    }
var feedXml = XDocument.Parse(e.Result);

            var gameData = feedXml.Root.Descendants("Game").Select(x => new GetGame
            {
                ID = (int)x.Element("id"),
                GameTitle = (string)x.Element("GameTitle"),
                Platform = (string)x.Element("Platform"),
                ReleaseDate = (string)x.Element("ReleaseDate"),
                Images = GetImages(x).ToList(),

            })
              .ToList();
            foreach (var item in gameData)
            {
                GetGameItems.Add(item);
            }         

private static IEnumerable<Uri> GetImages(XElement gameNode)
    {
        return gameNode
                  .Descendants("boxart")
                  .Select(t => new Uri("http://thegamesdb.net/banners/" + (string)t.Attribute("thumb")));
    }

public class GetGame
{
    public int ID { get; set; }
    public string GameTitle { get; set; }
    public string Platform { get; set; }
    public string ReleaseDate { get; set; }
    public List<Uri> Images { get; set; }
}
    <Data>
  <baseImgUrl>http://thegamesdb.net/banners/</baseImgUrl>
  <Game>
    <id>2</id>
    <GameTitle>Crysis</GameTitle>
     <PlatformId>1</PlatformId>
     <Platform>PC</Platform>
     <ReleaseDate>11/13/2007</ReleaseDate>
     <Overview>
     From the makers of Far Cry, Crysis offers FPS fans the best-looking, most highly-        evolving gameplay, requiring the player to use adaptive tactics and total customization of    weapons and armor to survive in dynamic, hostile environments including Zero-G. Earth, 2019. A team of US scientists makes a frightening discovery on an island in the South China Sea. All contact with the team is lost when the North Korean Government quickly seals off the area. The United States responds by dispatching an elite team of Delta Force Operators to recon the situation. As tension rises between the two nations, a massive alien ship reveals itself in the middle of the island. The ship generates an immense force sphere that freezes a vast portion of the island and drastically alters the global weather system. Now the US and North Korea must join forces to battle the alien menace. With hope rapidly fading, you must fight epic battles through tropical jungle, frozen landscapes, and finally into the heart of the alien ship itself for the ultimate Zero G showdown.
    </Overview>
    <ESRB>M - Mature</ESRB>
    <Genres>
    <genre>Shooter</genre>
    </Genres>
    <Players>4+</Players>
    <Co-op>No</Co-op>
    <Youtube>http://www.youtube.com/watch?v=i3vO01xQ-DM</Youtube>
    <Publisher>Electronic Arts</Publisher>
    <Developer>Crytek</Developer>
    <Rating>8.1111</Rating>
    <Images>
      <fanart>
        <original width="1920" height="1080">fanart/original/2-1.jpg</original>
        <thumb>fanart/thumb/2-1.jpg</thumb>
      </fanart>
      <fanart>
        <original width="1920" height="1080">fanart/original/2-2.jpg</original>
        <thumb>fanart/thumb/2-2.jpg</thumb>
      </fanart>
      <fanart>
        <original width="1920" height="1080">fanart/original/2-3.jpg</original>
        <thumb>fanart/thumb/2-3.jpg</thumb>
      </fanart>
      <fanart>
        <original width="1920" height="1080">fanart/original/2-4.jpg</original>
        <thumb>fanart/thumb/2-4.jpg</thumb>
      </fanart>
      <fanart>
        <original width="1920" height="1080">fanart/original/2-5.jpg</original>
        <thumb>fanart/thumb/2-5.jpg</thumb>
      </fanart>
      <fanart>
        <original width="1920" height="1080">fanart/original/2-6.jpg</original>
        <thumb>fanart/thumb/2-6.jpg</thumb>
      </fanart>
    <boxart side="back" width="1525" height="2162" thumb="boxart/thumb/original/back/2-1.jpg">boxart/original/back/2-1.jpg</boxart>
    <boxart side="front" width="1525" height="2160" thumb="boxart/thumb/original/front/2-1.jpg">boxart/original/front/2-1.jpg</boxart>
    <banner width="760" height="140">graphical/2-g2.jpg</banner>
    <banner width="760" height="140">graphical/2-g3.jpg</banner>
      <screenshot>
        <original width="1920" height="1080">screenshots/2-1.jpg</original>
        <thumb>screenshots/thumb/2-1.jpg</thumb>
      </screenshot>
    <clearlogo width="400" height="95">clearlogo/2.png</clearlogo>
    </Images>
  </Game>
</Data>
public List<Uri> Images { get; set; }
<phone:LongListSelector LayoutMode="Grid" IsGroupingEnabled="True" GridCellSize="180,180" Margin="0,0,-12,0" ItemsSource="{Binding Images}">
    <phone:LongListSelector.ItemTemplate>
        <DataTemplate>
            <Grid Background="{StaticResource PhoneAccentBrush}" Margin="5">
                <StackPanel>
                        <Image Source="{Binding}"></Image>
                </StackPanel>
            </Grid>
        </DataTemplate>
    </phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
<phone:LongListSelector Grid.Row="1" x:Name="MyList" LayoutMode="List" ItemsSource="{Binding}">
                <phone:LongListSelector.ItemTemplate>
                    <DataTemplate>
                            <StackPanel Orientation="Vertical">
                            <TextBlock Text="{Binding GameTitle}" />
                                <phone:LongListSelector LayoutMode="Grid" GridCellSize="180,180" ItemsSource="{Binding Images}">
                                    <phone:LongListSelector.ItemTemplate>
                                        <DataTemplate>
                                            <Image Source="{Binding}"></Image>
                                        </DataTemplate>
                                    </phone:LongListSelector.ItemTemplate>
                                </phone:LongListSelector>
                            </StackPanel>
                    </DataTemplate>
                </phone:LongListSelector.ItemTemplate>
            </phone:LongListSelector>