private async Task LoadFilmData() { BaseStorageHelper bsh = new BaseStorageHelper(); List <Uri> posterUrls = await bsh.GetImageList(); ImageTile it = new ImageTile() { Width = 300, Height = 300, Rows = 2, Columns = 3, Margin = new Thickness(20, 20, 0, 0), AnimationType = ImageTileAnimationTypes.Fade, ItemsSource = posterUrls }; Grid g = new Grid() { Width = 280, Height = 280, Margin = new Thickness(10) }; TextBlock tb = new TextBlock() { Text = "All Films", VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Bottom }; Grid.SetRow(tb, 0); Grid.SetColumn(tb, 0); g.Children.Add(tb); it.Content = g; it.Click += ImageTile_Click; this.wpHubTiles.Children.Add(it); }
private async Task LoadFilmData() { BaseStorageHelper bsh = new BaseStorageHelper(); List <Uri> posterUrls = await bsh.GetImageList(); ImageTile it = new ImageTile() { Width = 410, Height = 200, LargeTileColumns = 1, LargeTileRows = 1, Rows = 1, Columns = 3, Margin = new Thickness(0, 0, 10, 10), AnimationType = ImageTileAnimationTypes.Fade, ItemsSource = posterUrls }; Grid g = new Grid() { Width = 480, Height = 200, Margin = new Thickness(0) }; g.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); g.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); TextBlock tb = new TextBlock() { Text = "All Films", VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Bottom, Margin = new Thickness(10) }; Border b = new Border() { Background = new SolidColorBrush(Colors.Gray), Opacity = 0.9 }; b.Child = tb; Grid.SetRow(b, 0); Grid.SetColumn(b, 0); g.Children.Add(b); it.Content = g; ToolTipService.SetToolTip(it, "Click to view all films"); it.Click += ImageTile_Click; this.wpHubTiles.Children.Add(it); }