diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/AppUIBasics.csproj b/Samples/XamlUIBasics/cs/AppUIBasics/AppUIBasics.csproj
index 90f5445529..8fa2182c2c 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/AppUIBasics.csproj
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/AppUIBasics.csproj
@@ -10,8 +10,8 @@
AppUIBasics
en-US
UAP
- 10.0.17713.0
- 10.0.17713.0
+ 10.0.17758.0
+ 10.0.17134.0
14
true
512
@@ -147,7 +147,9 @@
+
+
@@ -184,7 +186,6 @@
-
@@ -501,9 +502,6 @@
StackPanelPage.xaml
-
- StandardSizingPage.xaml
-
SwipePage.xaml
@@ -568,6 +566,9 @@
PageHeader.xaml
+
+ SampleCompactSizingPage.xaml
+
SamplePage1.xaml
@@ -583,6 +584,9 @@
SampleSettingsPage.xaml
+
+ SampleStandardSizingPage.xaml
+
SearchResultsPage.xaml
@@ -680,6 +684,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -708,10 +716,6 @@
MSBuild:Compile
Designer
-
- Designer
- MSBuild:Compile
-
Designer
MSBuild:Compile
@@ -1032,6 +1036,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -1052,6 +1060,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer
@@ -1073,12 +1085,13 @@
6.2.0-Preview1-26502-02
- 2.0.180717002-prerelease
+ 2.0.180916002-prerelease
2.0.0
+
14.0
@@ -1090,4 +1103,4 @@
-->
-
+
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Assets/CompactSizing.png b/Samples/XamlUIBasics/cs/AppUIBasics/Assets/CompactSizing.png
new file mode 100644
index 0000000000..4e0a60a7ef
Binary files /dev/null and b/Samples/XamlUIBasics/cs/AppUIBasics/Assets/CompactSizing.png differ
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Assets/theme_editor2.gif b/Samples/XamlUIBasics/cs/AppUIBasics/Assets/theme_editor2.gif
deleted file mode 100644
index 58ab150ef4..0000000000
Binary files a/Samples/XamlUIBasics/cs/AppUIBasics/Assets/theme_editor2.gif and /dev/null differ
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ColorPaletteResourcesPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ColorPaletteResourcesPage.xaml
index 7c771061a8..2efa643b52 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ColorPaletteResourcesPage.xaml
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ColorPaletteResourcesPage.xaml
@@ -11,7 +11,7 @@
-
+
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml
index c4abf536f0..9464161474 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml
@@ -18,11 +18,13 @@
-
+
-
-
+
+
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml.cs
index 5660f648ce..ee11d24ad7 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml.cs
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CommandBarFlyoutPage.xaml.cs
@@ -1,4 +1,5 @@
-using Windows.UI;
+using Windows.Foundation.Metadata;
+using Windows.UI;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
@@ -14,7 +15,7 @@ public CommandBarFlyoutPage()
{
this.InitializeComponent();
}
-
+
public void OnClosed(object sender, object args)
{
myImageBorder.BorderBrush = new SolidColorBrush(Colors.Transparent);
@@ -31,12 +32,20 @@ public void Image_PointerReleased(object sender, PointerRoutedEventArgs args)
if (wasLeftPointerPressed)
{
- FlyoutShowOptions myOption = new FlyoutShowOptions();
- myOption.ShowMode = FlyoutShowMode.Transient;
- myOption.Placement = FlyoutPlacementMode.RightEdgeAlignedTop;
- CommandBarFlyout1.ShowAt(Image1, myOption);
+ if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
+ {
+ FlyoutShowOptions myOption = new FlyoutShowOptions();
+ myOption.ShowMode = FlyoutShowMode.Transient;
+ myOption.Placement = FlyoutPlacementMode.RightEdgeAlignedTop;
+ CommandBarFlyout1.ShowAt(Image1, myOption);
+ }
+ else
+ {
+ CommandBarFlyout1.ShowAt(Image1);
+ }
wasLeftPointerPressed = false;
}
+ args.Handled = true;
}
private void OnElementClicked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactDictionary.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactDictionary.xaml
new file mode 100644
index 0000000000..67bd94aa8d
--- /dev/null
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactDictionary.xaml
@@ -0,0 +1,30 @@
+
+
+ 12,5,10,5
+ 23
+
+
+
+
+
+
+
+
+
+
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml
index 708aee8421..8dcd909161 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml
@@ -10,7 +10,7 @@
//*********************************************************
-->
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -37,40 +31,17 @@
-
+
-
-
-
- <Application.Resources>
- <ResourceDictionary/>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="CompactSize.xaml">
- <ResourceDictionary.MergedDictionaries/>
- </ResourceDictionary>
- </Application.Resources>
-
-
-
- <Page.Resources>
- <ResourceDictionary/>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="CompactSize.xaml">
- <ResourceDictionary.MergedDictionaries/>
- </ResourceDictionary>
- </Page.Resources>
-
-
-
- <Grid.Resources>
- <ResourceDictionary/>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="CompactSize.xaml">
- <ResourceDictionary.MergedDictionaries/>
- </ResourceDictionary>
- </Grid.Resources>
-
-
+
+ <Application.Resources>
+ <ResourceDictionary/>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="CompactSize.xaml">
+ <ResourceDictionary.MergedDictionaries/>
+ </ResourceDictionary>
+ </Application.Resources>
+
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml.cs
index 76675061a8..d6a94da209 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml.cs
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/CompactSizingPage.xaml.cs
@@ -1,50 +1,31 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Runtime.InteropServices.WindowsRuntime;
-using Windows.Foundation;
-using Windows.Foundation.Collections;
-using Windows.UI.Xaml;
+using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Data;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Navigation;
-
-// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
+using Windows.UI.Xaml.Media.Animation;
+using AppUIBasics.SamplePages;
namespace AppUIBasics.ControlPages
{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
public sealed partial class CompactSizingPage : Page
{
-
- ResourceDictionary compact = new ResourceDictionary();
- Uri source = new Uri("ms-appx:///ControlPages/CompactSizing.xaml");
-
public CompactSizingPage()
{
this.InitializeComponent();
+
}
- private void Standard_Checked(object sender, RoutedEventArgs e)
+ private void Example1_Loaded(object sender, RoutedEventArgs e)
{
- //compact.Source = source;
- //CompactGrid.Resources.MergedDictionaries.Remove(compact);
-
+ ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo());
+ }
+ private void Standard_Checked(object sender, RoutedEventArgs e)
+ {
+ ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo());
}
private void Compact_Checked(object sender, RoutedEventArgs e)
- {
- //compact.Source = source;
- //CompactGrid.Resources.MergedDictionaries.Insert(0, compact);
-
- Frame.Navigate(typeof(StandardSizingPage));
+ {
+ ContentFrame.Navigate(typeof(SampleCompactSizingPage), null, new SuppressNavigationTransitionInfo());
}
}
}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/DataGridPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/DataGridPage.xaml
index df416de5e2..8020ef76ee 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/DataGridPage.xaml
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/DataGridPage.xaml
@@ -8,17 +8,13 @@
-
- The contents of a
- DataGrid control can be generated simply by using the
- ItemsSource property to bind to a collection of any type.
-
- The built-in column types include a text column, a check box column, and a template column for hosting custom content. The built-in row type includes a drop-down details section that you can use to display additional content below the cell values.
+
+ The built-in column types include a text column, a check box column, and a template column for hosting custom content. The built-in row type includes a drop-down details section that you can use to display additional content below the cell values.
The DataGrid control supports common table formatting options, such as alternating row backgrounds and foregrounds and the ability to show or hide headers, grid lines, and scroll bars. Additionally, the control provides several style and template properties that you can use to completely change the appearance of the control and its rows, columns, cells, and row or column headers.
-
+
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml
index cf776bb0fb..779163aa9d 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml
@@ -14,25 +14,11 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AppUIBasics"
- xmlns:common="using:AppUIBasics.Common"
- xmlns:data="using:AppUIBasics.Data">
+ xmlns:data="using:AppUIBasics.Data"
+ xmlns:local1="using:AppUIBasics.ControlPages">
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -41,72 +27,67 @@
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
+
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
None
@@ -116,26 +97,169 @@
+
+
+
+
- <ListView ItemsSource="{x:Bind Groups}"
- ItemTemplate="{StaticResource
- ImageTextListTemplate}"
-
-
- IsItemClickEnabled=""
-
-
- IsSwipeEnabled=""
-
-
- CanDragItems=""
-
-
- SelectionMode="" />
+ <ListView ItemsSource="{x:Bind Contacts}" SelectionMode="
+ "/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <CollectionViewSource x:Name="ContactsCVS" IsSourceGrouped="True"/>
+
+ <ListView ItemsSource="{x:Bind Contacts}"/>
+ <ListView.ItemsPanel/>
+ <ItemsPanelTemplate/>
+ <ItemsStackPanel AreStickyGroupHeadersEnabled="False"/>
+ <ItemsPanelTemplate />
+ <ListView.ItemsPanel/>
+ <ListView/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <CollectionViewSource x:Name="ContactsCVS" IsSourceGrouped="True"/>
+
+ <ListView ItemsSource="{x:Bind Contacts}"/>
+ <ListView.ItemsPanel/>
+ <ItemsPanelTemplate/>
+ <ItemsStackPanel AreStickyGroupHeadersEnabled="True"/>
+ <ItemsPanelTemplate />
+ <ListView.ItemsPanel/>
+ <ListView/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Refer to the DataTemplate on the ListViewPage.xaml page to get this visual of Images in a list
+
+
+
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml.cs
index f26b1850ee..a8be6f7305 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml.cs
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ListViewPage.xaml.cs
@@ -7,19 +7,18 @@
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
-using AppUIBasics.Common;
using AppUIBasics.Data;
+using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Linq;
-using Windows.UI.Xaml;
+using System.Threading.Tasks;
+using Windows.Storage;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace AppUIBasics.ControlPages
{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
public sealed partial class ListViewPage : ItemsPageBase
{
public ListViewPage()
@@ -27,72 +26,91 @@ public ListViewPage()
this.InitializeComponent();
}
- protected override void OnNavigatedTo(NavigationEventArgs e)
+ protected override async void OnNavigatedTo(NavigationEventArgs e)
{
- base.OnNavigatedTo(e);
-
Items = ControlInfoDataSource.Instance.Groups.Take(3).SelectMany(g => g.Items).ToList();
- }
-
- private void ItemTemplate_Click(object sender, RoutedEventArgs e)
- {
- var template = (sender as FrameworkElement).Tag.ToString();
- Control1.ItemTemplate = (DataTemplate)this.Resources[template];
- itemTemplate.Text = template;
- }
-
- private void Control1_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (sender is ListView listView)
- {
- SelectionOutput.Text = string.Format("You have selected {0} item(s).", listView.SelectedItems.Count);
- }
- }
-
- private void Control1_ItemClick(object sender, ItemClickEventArgs e)
- {
- ClickOutput.Text = string.Format("You clicked {0}.", e.ClickedItem.ToString());
- }
-
- private void ItemClickCheckBox_Click(object sender, RoutedEventArgs e)
- {
- ClickOutput.Text = string.Empty;
- }
-
- private void FlowDirectionCheckBox_Click(object sender, RoutedEventArgs e)
- {
- if (Control1.FlowDirection == FlowDirection.LeftToRight)
- {
- Control1.FlowDirection = FlowDirection.RightToLeft;
- }
- else
- {
- Control1.FlowDirection = FlowDirection.LeftToRight;
- }
+ Control4.ItemsSource = AppUIBasics.ControlPages.CustomDataObject.GetDataObjects();
+ ContactsCVS.Source = await Contact.GetContactsGroupedAsync();
}
private void SelectionModeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
- if (Control1 != null)
+ if (Control2 != null)
{
string colorName = e.AddedItems[0].ToString();
switch (colorName)
{
case "None":
- Control1.SelectionMode = ListViewSelectionMode.None;
- SelectionOutput.Text = string.Empty;
+ Control2.SelectionMode = ListViewSelectionMode.None;
break;
case "Single":
- Control1.SelectionMode = ListViewSelectionMode.Single;
+ Control2.SelectionMode = ListViewSelectionMode.Single;
break;
case "Multiple":
- Control1.SelectionMode = ListViewSelectionMode.Multiple;
+ Control2.SelectionMode = ListViewSelectionMode.Multiple;
break;
case "Extended":
- Control1.SelectionMode = ListViewSelectionMode.Extended;
+ Control2.SelectionMode = ListViewSelectionMode.Extended;
break;
}
}
}
}
+
+ public class Contact
+ {
+ #region Properties
+ public string FirstName { get; private set; }
+ public string LastName { get; private set; }
+ public string Company { get; private set; }
+ public string Name => FirstName + " " + LastName;
+ #endregion
+
+ public Contact(string firstName, string lastName, string company)
+ {
+ FirstName = firstName;
+ LastName = lastName;
+ Company = company;
+ }
+
+ #region Public Methods
+ public static async Task> GetContactsAsync()
+ {
+ StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/Contacts.txt"));
+ IList lines = await FileIO.ReadLinesAsync(file);
+
+ var contacts = new ObservableCollection();
+
+ for (int i = 0; i < lines.Count; i += 3)
+ {
+ contacts.Add(new Contact(lines[i], lines[i + 1], lines[i + 2]));
+ }
+
+ return contacts;
+ }
+
+ public static async Task> GetContactsGroupedAsync()
+ {
+ var query = from item in await GetContactsAsync()
+ group item by item.LastName.Substring(0, 1).ToUpper() into g
+ orderby g.Key
+ select new GroupInfoList(g) { Key = g.Key };
+
+ return new ObservableCollection(query);
+ }
+
+ public override string ToString()
+ {
+ return Name;
+ }
+ #endregion
+ }
+
+ public class GroupInfoList : List
-
-
-
-
-
-
- 48
- 2
- 0,9.5,0,9.5
- 64
- 8,1,6,1
- 12,5,10,5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <Application.Resources>
- <ResourceDictionary/>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="CompactSize.xaml">
- <ResourceDictionary.MergedDictionaries/>
- </ResourceDictionary>
- </Application.Resources>
-
-
-
- <Page.Resources>
- <ResourceDictionary/>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="CompactSize.xaml">
- <ResourceDictionary.MergedDictionaries/>
- </ResourceDictionary>
- </Page.Resources>
-
-
-
- <Grid.Resources>
- <ResourceDictionary/>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="CompactSize.xaml">
- <ResourceDictionary.MergedDictionaries/>
- </ResourceDictionary>
- </Grid.Resources>
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/UICommandPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/UICommandPage.xaml
index a904ba4eec..8093efe308 100644
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/UICommandPage.xaml
+++ b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/UICommandPage.xaml
@@ -8,7 +8,6 @@
xmlns:muxcontrols="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">
-