This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
656 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...rols/GalleryPages/CollectionViewGalleries/SelectionGalleries/PreselectedItemsGallery.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries.SelectionGalleries.PreselectedItemsGallery"> | ||
<ContentPage.Content> | ||
<StackLayout Margin="10"> | ||
|
||
<Label Text="The CollectionView below should have several items already selected."/> | ||
|
||
<CollectionView x:Name="CollectionView" Grid.Row="3"> | ||
<CollectionView.ItemsLayout> | ||
<GridItemsLayout Span="4" Orientation="Vertical"></GridItemsLayout> | ||
</CollectionView.ItemsLayout> | ||
</CollectionView> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
</ContentPage> |
31 changes: 31 additions & 0 deletions
31
...s/GalleryPages/CollectionViewGalleries/SelectionGalleries/PreselectedItemsGallery.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using Xamarin.Forms; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries.SelectionGalleries | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
public partial class PreselectedItemsGallery : ContentPage | ||
{ | ||
readonly DemoFilteredItemSource _demoFilteredItemSource = new DemoFilteredItemSource(); | ||
|
||
public PreselectedItemsGallery() | ||
{ | ||
InitializeComponent(); | ||
|
||
CollectionView.ItemTemplate = ExampleTemplates.PhotoTemplate(); | ||
CollectionView.ItemsSource = _demoFilteredItemSource.Items; | ||
|
||
CollectionView.SelectedItems.Add(_demoFilteredItemSource.Items.Skip(2).First()); | ||
CollectionView.SelectedItems.Add(_demoFilteredItemSource.Items.Skip(4).First()); | ||
CollectionView.SelectedItems.Add(_demoFilteredItemSource.Items.Skip(5).First()); | ||
|
||
CollectionView.SelectionMode = SelectionMode.Multiple; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.