();
-
- private void DeleteOne_ItemInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args)
- {
- isArchived = !isArchived;
-
- if(isArchived)
- {
- ((TextBlock)args.SwipeControl.Content).Text = "Archived - Swipe Left";
- }
- else
- {
- ((TextBlock)args.SwipeControl.Content).Text = "Swipe Left";
- }
- }
-
- private void DeleteItem_ItemInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args)
- {
- items.Remove(args.SwipeControl.DataContext);
- }
-
- private void Accept_ItemInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args)
- {
- isAccepted = !isAccepted;
- CheckAcceptFlagBool(args.SwipeControl);
-
- if (isAccepted)
- {
- FontIconSource cancelIcon = new FontIconSource() { Glyph = "\ue711" };
- sender.IconSource = cancelIcon;
- sender.Text = "Cancel";
- }
- else
- {
- FontIconSource acceptIcon = new FontIconSource() { Glyph = "\ue10B" };
- sender.IconSource = acceptIcon;
- sender.Text = "Accept";
- }
- }
-
- private void Flag_ItemInvoked(SwipeItem sender, SwipeItemInvokedEventArgs args)
- {
- isFlagged = !isFlagged;
- CheckAcceptFlagBool(args.SwipeControl);
-
- if (isFlagged)
- {
- FontIconSource filledFlagIcon = new FontIconSource() { Glyph = "\ueB4B" };
- sender.IconSource = filledFlagIcon;
- sender.Text = "Unmark";
- }
- else
- {
- FontIconSource flagIcon = new FontIconSource() { Glyph = "\ue129" };
- sender.IconSource = flagIcon;
- sender.Text = "Flag";
- }
- }
-
- private void CheckAcceptFlagBool(SwipeControl swipeCtrl)
- {
- if(isAccepted && !isFlagged)
- {
- ((TextBlock)swipeCtrl.Content).Text = "Swipe Right - Accepted";
- }
- else if (isAccepted && isFlagged)
- {
- ((TextBlock)swipeCtrl.Content).Text = "Swipe Right - Accepted & Flagged";
- }
- else if (!isAccepted && isFlagged)
- {
- ((TextBlock)swipeCtrl.Content).Text = "Swipe Right - Flagged";
- }
- else
- {
- ((TextBlock)swipeCtrl.Content).Text = "Swipe Right";
- }
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBlockPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBlockPage.xaml
deleted file mode 100644
index 800d34207e..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBlockPage.xaml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
- <TextBlock Text="I am a TextBlock"/>
-
-
-
-
-
-
-
-
-
- <TextBlock Text="I am a styled TextBlock"
- Style="{StaticResource OutputTextBlockStyle}" />
-
-
-
-
-
-
-
-
-
-
- <TextBlock Text="I am super excited to be here!"
- FontFamily="Arial"
-
-
- FontSize="24" FontStyle="Italic" TextWrapping="WrapWholeWords"
-
-
- CharacterSpacing="200" Foreground="CornflowerBlue" />
-
-
-
-
-
-
-
- Text in a TextBlock doesn't have to be a simple string.
-
- Text can be bold , italic , or underlined .
-
-
-
- <TextBlock>
- <Run FontFamily="Times New Roman" Foreground="DarkGray">
- Text in a TextBlock doesn't have to be a simple string.</Run>
- <LineBreak/>
- <Span>Text can be <Bold>bold</Bold>,
- <Italic>italic</Italic>, or <Underline>underlined</Underline>. </Span>
- </TextBlock>
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBlockPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBlockPage.xaml.cs
deleted file mode 100644
index d6858807e7..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBlockPage.xaml.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-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.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 http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class TextBlockPage : Page
- {
- public TextBlockPage()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBoxPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBoxPage.xaml
deleted file mode 100644
index 845b5e2791..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBoxPage.xaml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
- <TextBox/>
-
-
-
-
-
-
-
-
-
- <TextBlock Height="60"
- Header="Enter your name:" PlaceholderText="Name" />
-
-
-
-
-
-
-
-
- <TextBox Text="I am super excited to be here!"
- IsReadOnly="True"
-
-
- FontFamily="Arial" FontSize="24" FontStyle="Italic"
-
-
- CharacterSpacing="200" Foreground="CornflowerBlue" />
-
-
-
-
-
-
-
-
- <TextBox
- TextWrapping="Wrap" AcceptsReturn="True" IsSpellCheckEnabled="True" SelectionHighlightColor="Green" >
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBoxPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBoxPage.xaml.cs
deleted file mode 100644
index b9d1f764ae..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TextBoxPage.xaml.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-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.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 http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class TextBoxPage : Page
- {
- public TextBoxPage()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TimePickerPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TimePickerPage.xaml
deleted file mode 100644
index 84a69bb711..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TimePickerPage.xaml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
- <TimePicker/>
-
-
-
-
-
-
-
- <TimePicker
- Header="Arrival time" MinuteIncrement="15" />
-
-
-
-
-
-
-
-
- <TimePicker
- ClockIdentifier="24HourClock" Header="24 hour clock" />
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TimePickerPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TimePickerPage.xaml.cs
deleted file mode 100644
index 571190457a..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TimePickerPage.xaml.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-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.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 http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class TimePickerPage : Page
- {
- public TimePickerPage()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleButtonPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleButtonPage.xaml
deleted file mode 100644
index b0b1c7bb5d..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleButtonPage.xaml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <ToggleButton Content="ToggleButton" Click="Button_Click"/>
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleButtonPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleButtonPage.xaml.cs
deleted file mode 100644
index ce67ed5ae9..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleButtonPage.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-
-// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class ToggleButtonPage : Page
- {
- public ToggleButtonPage()
- {
- this.InitializeComponent();
-
- // Set initial outpput value.
- Control1Output.Text = (bool)Toggle1.IsChecked ? "On" : "Off";
- }
-
- private void ToggleButton_Checked(object sender, RoutedEventArgs e)
- {
- Control1Output.Text = "On";
- }
-
- private void ToggleButton_Unchecked(object sender, RoutedEventArgs e)
- {
- Control1Output.Text = "Off";
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleSwitchPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleSwitchPage.xaml
deleted file mode 100644
index e0e9c458bd..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleSwitchPage.xaml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
- <ToggleSwitch/>
-
-
-
-
-
-
-
-
-
-
-
- <ToggleSwitch
- Header="Toggle work" OffContent="Do work" OnContent="Working" IsOn="True" />
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleSwitchPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleSwitchPage.xaml.cs
deleted file mode 100644
index 16f45b1e0c..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToggleSwitchPage.xaml.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-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.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 http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class ToggleSwitchPage : Page
- {
- public ToggleSwitchPage()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToolTipPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToolTipPage.xaml
deleted file mode 100644
index 81a964a65a..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToolTipPage.xaml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- <Button Content="Button with a simple ToolTip." ToolTipService.ToolTip="Simple ToolTip"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <TextBlock Text="TextBlock with an offset ToolTip."/>
- <ToolTipService.ToolTip/>
- <ToolTip Content="Offset ToolTip." HorizontalOffset="100" VerticalOffset="-80"/>
- </ToolTipService.ToolTip/>
- </TextBlock>
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToolTipPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToolTipPage.xaml.cs
deleted file mode 100644
index 4a787befe3..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ToolTipPage.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-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.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 http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class ToolTipPage : Page
- {
- public ToolTipPage()
- {
- this.InitializeComponent();
- }
-
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TreeViewPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TreeViewPage.xaml
deleted file mode 100644
index 20b74decca..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TreeViewPage.xaml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- <controls:TreeView/>
-
- TreeViewNode workFolder = new TreeViewNode() { Data = "Folder1" };
- workFolder.Add(new TreeViewNode() { Data = "1.1" });
- workFolder.Add(new TreeViewNode() { Data = "1.2" });
- workFolder.Add(new TreeViewNode() { Data = "1.3" });
-
- TreeViewNode remodelFolder = new TreeViewNode() { Data = "Folder2" };
- remodelFolder.Add(new TreeViewNode() { Data = "2.1" });
- remodelFolder.Add(new TreeViewNode() { Data = "2.2" });
- remodelFolder.Add(new TreeViewNode() { Data = "2.3" });
-
- personalFolder = new TreeViewNode() { Data = "TopLevel", IsExpanded = true };
-
- personalFolder.Add(workFolder);
- personalFolder.Add(remodelFolder);
- sampleTreeView.RootNode.Add(personalFolder);
-
-
-
-
-
-
-
-
-
-
-
-
-
- <controls:TreeView SelectionMode="Multiple"/>
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TreeViewPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TreeViewPage.xaml.cs
deleted file mode 100644
index 164fb75d56..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/TreeViewPage.xaml.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-using AppUIBasics.Common;
-using AppUIBasics.Data;
-using System.Collections.Generic;
-using System.Linq;
-using Windows.Foundation.Metadata;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-
-// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class TreeViewPage : Page
- {
- TreeViewNode personalFolder;
- TreeViewNode personalFolder2;
-
- public TreeViewPage()
- {
- this.InitializeComponent();
-
- if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 6))
- {
-
- TreeViewNode workFolder = new TreeViewNode() { Content = "Work Documents" };
- workFolder.IsExpanded = true;
-
- workFolder.Children.Add(new TreeViewNode() { Content = "XYZ Functional Spec" });
- workFolder.Children.Add(new TreeViewNode() { Content = "Feature Schedule" });
- workFolder.Children.Add(new TreeViewNode() { Content = "Overall Project Plan" });
- workFolder.Children.Add(new TreeViewNode() { Content = "Feature Rsource Allocation" });
-
- TreeViewNode remodelFolder = new TreeViewNode() { Content = "Home Remodel" };
- remodelFolder.IsExpanded = true;
-
- remodelFolder.Children.Add(new TreeViewNode() { Content = "Contractor Contact Info" });
- remodelFolder.Children.Add(new TreeViewNode() { Content = "Paint Color Scheme" });
- remodelFolder.Children.Add(new TreeViewNode() { Content = "Flooring woodgrain type" });
- remodelFolder.Children.Add(new TreeViewNode() { Content = "Kitchen cabinet style" });
-
- personalFolder = new TreeViewNode() { Content = "Personal Documents" };
- personalFolder.IsExpanded = true;
- personalFolder.Children.Add(remodelFolder);
-
- personalFolder2 = new TreeViewNode() { Content = "Personal Documents" };
- personalFolder2.IsExpanded = true;
- personalFolder2.Children.Add(remodelFolder);
-
- sampleTreeView.RootNodes.Add(workFolder);
- sampleTreeView.RootNodes.Add(personalFolder);
-
- sampleTreeView2.RootNodes.Add(workFolder);
- sampleTreeView2.RootNodes.Add(personalFolder2);
- }
-
- }
-
- private void sampleTreeView_ItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args)
- {
- return;
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/VariableSizedWrapGridPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/VariableSizedWrapGridPage.xaml
deleted file mode 100644
index 38635107d7..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/VariableSizedWrapGridPage.xaml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <VariableSizedWrapGrid Grid.Row="1" Orientation="Vertical "
- MaximumRowsOrColumns="3" ItemHeight="44" ItemWidth="44">
-
- <Rectangle Fill="Red"/>
- <Rectangle Fill="Blue" Height="80" VariableSizedWrapGrid.RowSpan="2"/>
- <Rectangle Fill="Green" Width="80" VariableSizedWrapGrid.ColumnSpan="2"/>
- <Rectangle Fill="Yellow" Height="80" Width="80" VariableSizedWrapGrid.RowSpan="2" VariableSizedWrapGrid.ColumnSpan="2"/>
- </VariableSizedWrapGrid>
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/VariableSizedWrapGridPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/VariableSizedWrapGridPage.xaml.cs
deleted file mode 100644
index 00a07d31e3..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/VariableSizedWrapGridPage.xaml.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-
-// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class VariableSizedWrapGridPage : Page
- {
- public VariableSizedWrapGridPage()
- {
- this.InitializeComponent();
- }
-
- private void RadioButton_Checked(object sender, RoutedEventArgs e)
- {
- if (sender is RadioButton rb && Control1 != null)
- {
- string orientationName = rb.Tag.ToString();
- if (OrientationLabel != null)
- {
- OrientationLabel.Text = orientationName;
- }
-
- switch (orientationName)
- {
- case "Horizontal":
- Control1.Orientation = Orientation.Horizontal;
- break;
- case "Vertical":
- Control1.Orientation = Orientation.Vertical;
- break;
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ViewBoxPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ViewBoxPage.xaml
deleted file mode 100644
index 1107782a45..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ViewBoxPage.xaml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <Viewbox Height=" "
- Width=" " StretchDirection="Both">
-
- <Border BorderBrush="Gray" BorderThickness="15">
- <StackPanel Background="DarkGray">
- <StackPanel Orientation="Horizontal">
- <Rectangle Fill="Blue" Height="10" Width="40"/>
- <Rectangle Fill="Green" Height="10" Width="40"/>
- <Rectangle Fill="Red" Height="10" Width="40"/>
- <Rectangle Fill="Yellow" Height="10" Width="40"/>
- </StackPanel>
- <Image Source="ms-appx:///Assets/Slices.png"/>
- <TextBlock Text="This is text." HorizontalAlignment="Center"/>
- </StackPanel>
- </Border>
- </Viewbox>
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ViewBoxPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ViewBoxPage.xaml.cs
deleted file mode 100644
index 015d7bc531..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ControlPages/ViewBoxPage.xaml.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Media;
-
-// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
-
-namespace AppUIBasics.ControlPages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class ViewBoxPage : Page
- {
- public ViewBoxPage()
- {
- this.InitializeComponent();
- }
-
- private void StretchDirectionButton_Checked(object sender, RoutedEventArgs e)
- {
- RadioButton rb = sender as RadioButton;
-
- if (rb != null && Control1 != null)
- {
- string direction = rb.Tag.ToString();
- switch (direction)
- {
- case "UpOnly":
- Control1.StretchDirection = StretchDirection.UpOnly;
- break;
- case "DownOnly":
- Control1.StretchDirection = StretchDirection.DownOnly;
- break;
- case "Both":
- Control1.StretchDirection = StretchDirection.Both;
- break;
- }
- }
- }
-
- private void StretchButton_Checked(object sender, RoutedEventArgs e)
- {
- RadioButton rb = sender as RadioButton;
-
- if (rb != null && Control1 != null)
- {
- string stretch = rb.Tag.ToString();
- switch (stretch)
- {
- case "None":
- Control1.Stretch = Stretch.None;
- break;
- case "Fill":
- Control1.Stretch = Stretch.Fill;
- break;
- case "Uniform":
- Control1.Stretch = Stretch.Uniform;
- break;
- case "UniformToFill":
- Control1.Stretch = Stretch.UniformToFill;
- break;
- }
- }
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/DataModel/ControlInfoData.json b/Samples/XamlUIBasics/cs/AppUIBasics/DataModel/ControlInfoData.json
deleted file mode 100644
index fd119b8037..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/DataModel/ControlInfoData.json
+++ /dev/null
@@ -1,1634 +0,0 @@
-{
- "Groups": [
- {
- "UniqueId": "AllControls",
- "Title": "All controls",
- "Subtitle": "",
- "ImagePath": "ms-appx:///Assets/NavigationViewItemIcons/AllControlsIcon.png",
- "Description": "",
- "Items": []
- },
- {
- "UniqueId": "NewControls",
- "Title": "What's New",
- "Subtitle": "",
- "ImagePath": "ms-appx:///Assets/NavigationViewItemIcons/NewControlsIcon.png",
- "Description": "",
- "Items": []
- },
- {
- "UniqueId": "Commanding",
- "Title": "Commanding",
- "Subtitle": "AppBar, CommandBar, AppBarButton, AppBarToggleButton, AppBarSeparator",
- "ImagePath": "ms-appx:///Assets/NavigationViewItemIcons/CommandingIcon.png",
- "Description": "Use app bars to present navigation, commands, and tools to users.",
- "Items": [
-
- {
- "UniqueId": "AppBarButton",
- "Title": "AppBarButton",
- "Subtitle": "A button that's styled for use in a CommandBar.",
- "ImagePath": "ms-appx:///Assets/AppBarButton.png",
- "Description": "App bar buttons differ from standard buttons in several ways:\n- Their default appearance is a transparent background with a smaller size.\n- You use the Label and Icon properties to set the content instead of the Content property. The Content property is ignored.\n- The button's IsCompact property controls its size.",
- "Content": "You can open the app bar and toggle the IsCompact button to see how the app bar buttons on this page change.
Use the Label and Icon properties to define the content of the app bar buttons. Set the Label property to a string to specify the text label. The label is shown by default but is hidden when the button is in its compact state, so you also need to specify a meaningful icon. To do that, set the button's Icon property to an element derived from the IconElement class. Four kinds of icon elements are provided:
FontIcon - The icon is based on a glyph from the specified font family.
BitmapIcon - The icon is based on a bitmap image file with the specified Uri.
PathIcon - The icon is based on Path data.
SymbolIcon - The icon is based on a predefined list of glyphs from the Segoe UI Symbol font.
Look at the AppBarButtonPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "AppBarButton",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.appbarbutton.aspx"
- },
- {
- "Title": "SymbolIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.symbolicon.aspx"
- },
- {
- "Title": "FontIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.fonticon.aspx"
- },
- {
- "Title": "BitmapIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.bitmapicon.aspx"
- },
- {
- "Title": "PathIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.pathicon.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/windows/uwp/controls-and-patterns/app-bars"
- }
- ],
- "RelatedControls": [ "AppBarToggleButton", "AppBarSeparator", "CommandBar" ]
- },
- {
- "UniqueId": "AppBarSeparator",
- "Title": "AppBarSeparator",
- "Subtitle": "A vertical line that's used to visually separate groups of commands in an app bar.",
- "ImagePath": "ms-appx:///Assets/AppBarSeparator.png",
- "Description": "An AppBarSeparator creates a vertical line to visually separate groups of commands in a app bar. It has a compact state with reduced padding to match the compact state of the AppBarButton and AppBarToggleButton controls.",
- "Content": "You can open the app bar and toggle the IsCompact button to see how the app bar buttons and separators on this page change.
When the IsCompact property is true, the padding around the AppBarSeparator is reduced.
Look at the AppBarSeparatorPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "AppBarSeparator",
- "Uri": "https://docs.microsoft.com/uwp/api/windows.ui.xaml.controls.appbarseparator"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/windows/uwp/controls-and-patterns/app-bars"
- }
- ],
- "RelatedControls": [
- "AppBarButton",
- "AppBarToggleButton",
- "CommandBar"
- ]
- },
- {
- "UniqueId": "AppBarToggleButton",
- "Title": "AppBarToggleButton",
- "Subtitle": "A button that can be on, off, or indeterminate like a CheckBox, and is styled for use in an app bar or other specialized UI.",
- "ImagePath": "ms-appx:///Assets/AppBarToggleButton.png",
- "Description": "An AppBarToggleButton looks like an AppBarButton, but works like a CheckBox. It typically has two states, checked (on) or unchecked (off), but can be indeterminate if the IsThreeState property is true. You can determine it's state by checking the IsChecked property.",
- "Content": "You can open the app bar and toggle the IsCompact button to see how the app bar buttons on this page change.
Look at the AppBarToggleButtonPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "AppBarToggleButton",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.appbartogglebutton.aspx"
- },
- {
- "Title": "SymbolIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.symbolicon.aspx"
- },
- {
- "Title": "FontIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.fonticon.aspx"
- },
- {
- "Title": "BitmapIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.bitmapicon.aspx"
- },
- {
- "Title": "PathIcon",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.pathicon.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/windows/uwp/controls-and-patterns/app-bars"
- }
- ],
- "RelatedControls": [
- "AppBarButton",
- "AppBarSeparator",
- "CommandBar"
- ]
- },
- {
- "UniqueId": "Button",
- "Title": "Button",
- "Subtitle": "A control that responds to user input and raises a Click event.",
- "ImagePath": "ms-appx:///Assets/Button.png",
- "Description": "The Button control provides a Click event to respond to user input from a touch, mouse, keyboard, stylus, or other input device. You can put different kinds of content in a button, such as text or an image, or you can restyle a button to give it a new look.",
- "Content": "The main purpose of a Button is to make something happen when a user clicks it. There are two ways you can make something happen:
Handle the Click event. Bind the Command property to an ICommand implementation that describes the command logic. Buttons often have only simple string content, but you can use any object as content. You can also change the style and template to give them any look you want.
Look at the ButtonPage.xaml file in Visual Studio to see the custom button style and template definitions used on this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Button",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.button.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/buttons"
- }
- ],
- "RelatedControls": [
- "ToggleButton",
- "RepeatButton",
- "HyperlinkButton",
- "AppBarButton"
- ]
- },
- {
- "UniqueId": "CommandBar",
- "Title": "CommandBar",
- "Subtitle": "A toolbar for displaying application-specific commands that handles layout and resizing of its contents.",
- "ImagePath": "ms-appx:///Assets/CommandBar.png",
- "Description": "The CommandBar simplifies the creation of basic app bars by providing:\n- Automatic layout of commands, with primary commands on the right and secondary commands on the left.\n- Automatic resizing of app bar commands when the app size changes.\nWhen you need an app bar that contains only AppBarButton,AppBarToggleButton , and AppBarSeparator controls, use a CommandBar. If you need more complex content, such as images, progress bars, or text blocks, use an AppBar control.",
- "Content": "The bottom app bar on this page is a CommandBar control.
Add secondary commands and then resize the app to see how the CommandBar automatically adapts to different widths.
This CommandBar element is in the ItemPage so it can be shared across all control pages in the app. Look at the ItemPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "CommandBar",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.commandbar.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/windows/uwp/controls-and-patterns/app-bars"
- }
- ],
- "RelatedControls": [
- "AppBarButton",
- "AppBarToggleButton",
- "AppBarSeparator"
- ]
- },
- {
- "UniqueId": "ContentDialog",
- "Title": "ContentDialog",
- "Subtitle": "A dialog box that can be customized to contain any XAML content.",
- "ImagePath": "ms-appx:///Assets/DefaultIcon.png",
- "Description": "Use a ContentDialog to show relavant information or to provide a modal dialog experience that can show any XAML content.",
- "Content": "Look at the ContentDialog.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ContentDialog",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.contentdialog.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/dialogs"
- }
- ],
- "RelatedControls": [
- "Flyout",
- "MenuFlyout",
- "ToolTip"
- ]
- },
- {
- "UniqueId": "HyperlinkButton",
- "Title": "HyperlinkButton",
- "Subtitle": "A button that appears as hyperlink text, and can navigate to a URI or handle a Click event.",
- "ImagePath": "ms-appx:///Assets/HyperlinkButton.png",
- "Description": "A HyperlinkButton appears as a text hyperlink. When a user clicks it, it opens the page you specify in the NavigateUri property in the default browser. Or you can handle its Click event, typically to navigate within your app.",
- "Content": "A HyperlinkButton looks like hyperlink text, but works like a button. You can use it in two ways:
Set the NavigateUri property. When a user clicks it, it will automatically open the URI in the default browser. Handle the Click event. This works just like the Click event of a standard Button , and can be used to navigate within your app. Each control page in this app has two sets of hyperlink buttons, one set to open documentation in Internet Explorer, and one set to navigate to related control pages in the app.
Look at the HyperlinkButtonPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "HyperlinkButton",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.hyperlinkbutton.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/hyperlinks"
- }
- ],
- "RelatedControls": [
- "Button",
- "ToggleButton",
- "RepeatButton",
- "AppBarButton"
- ]
- },
- {
- "UniqueId": "MenuFlyout",
- "Title": "MenuFlyout",
- "Subtitle": "Shows a contextual list of simple commands or options.",
- "ImagePath": "ms-appx:///Assets/MenuFlyout.png",
- "Description": "A MenuFlyout displays lightweight UI that is light dismissed by clicking or tapping off of it. Use it to let the user choose from a contextual list of simple commands or options.",
- "Content": "Look at the MenuFlyoutPage.xaml file in Visual Studio to see the full code.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "MenuFlyout",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.menuflyout.aspx"
- },
- {
- "Title": "MenuFlyoutItem",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.menuflyoutitem.aspx"
- },
- {
- "Title": "MenuFlyoutSeparator",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.menuflyoutseparator.aspx"
- },
- {
- "Title": "ToggleMenuFlyoutItem",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.togglemenuflyoutitem.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/dialogs"
- }
- ],
- "RelatedControls": [
- "Flyout",
- "ContentDialog",
- "Button",
- "AppBarButton"
- ]
- },
- {
- "UniqueId": "RepeatButton",
- "Title": "RepeatButton",
- "Subtitle": "A button that raises its Click event repeatedly from the time it's pressed until it's released.",
- "ImagePath": "ms-appx:///Assets/Button.png",
- "Description": "The RepeatButton control is like a standard Button, except that the Click event occurs continuously while the user presses the RepeatButton.",
- "Content": "A RepeatButton looks just like a regular Button , but it's Click event occurs continuously while the button is pressed.
Look at the RepeatButtonPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "RepeatButton",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.primitives.repeatbutton.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/buttons"
- }
- ],
- "RelatedControls": [
- "Button",
- "ToggleButton",
- "HyperlinkButton",
- "AppBarButton"
- ]
- },
- {
- "UniqueId": "SwipeControl",
- "Title": "SwipeControl",
- "Subtitle": "Touch gesture for quick menu actions on items.",
- "ImagePath": "ms-appx:///Assets/Swipe.png",
- "Description": "Released Fall 2017! Touch gesture for quick menu actions on items.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "SwipeControl",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.swipecontrol"
- },
- {
- "Title": "SwipeItems",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.swipeitems"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/swipe"
- },
- {
- "Title": "Gesture Actions",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/collection-commanding/"
- }
- ],
- "RelatedControls": [
- "GridView",
- "ListView"
- ]
- },
- {
- "UniqueId": "ToggleButton",
- "Title": "ToggleButton",
- "Subtitle": "A button that can be switched between two states like a CheckBox.",
- "ImagePath": "ms-appx:///Assets/ToggleButton.png",
- "Description": "A ToggleButton looks like a Button, but works like a CheckBox. It typically has two states, checked (on) or unchecked (off), but can be indeterminate if the IsThreeState property is true. You can determine it's state by checking the IsChecked property.",
- "Content": "ToggleButton is used as a base class for similar controls like CheckBox and RadioButton . It can be used on its own, but don't use it if a CheckBox , RadioButton , or ToggleSwitch would convey your intent better.
Look at the ToggleButtonPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ToggleButton",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.primitives.togglebutton.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/toggles"
- }
- ],
- "RelatedControls": [
- "Button",
- "AppBarToggleButton",
- "ToggleSwitch",
- "CheckBox"
- ]
- }
-
- ]
- },
- {
- "UniqueId": "Collections",
- "Title": "Collections",
- "Subtitle": "FlipView, GridView, ListView, Pivot, SemanticZoom, Hub",
- "ImagePath": "\uE292",
- "Description": "Use collection controls to display, navigate, and interact with collections of data and media.",
- "Items": [
- {
- "UniqueId": "ComboBox",
- "Title": "ComboBox",
- "Subtitle": "A drop-down list of items a user can select from.",
- "ImagePath": "ms-appx:///Assets/ComboBox.png",
- "Description": "Use a ComboBox when you need to conserve on-screen space and when users select only one option at a time. A ComboBox shows only the currently selected item.",
- "Content": "Look at the ComboBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ComboBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.combobox.aspx"
- },
- {
- "Title": "ComboBoxItem",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.comboboxitem.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/lists"
- }
- ],
- "RelatedControls": [
- "ListBox",
- "RadioButton",
- "CheckBox",
- "ListView",
- "AutoSuggestBox",
- "RatingControl"
- ]
- },
- {
- "UniqueId": "FlipView",
- "Title": "FlipView",
- "Subtitle": "Presents a collection of items that the user can flip through, one item at a time.",
- "ImagePath": "ms-appx:///Assets/FlipView.png",
- "Description": "The FlipView lets you flip through a collection of items, one at a time. It's great for displaying images from a gallery, pages of a magazine, or similar items.",
- "Content": "FlipView is an ItemsControl , so it can contain a collection of items of any type. To populate the view, add items to the Items collection, or set the ItemsSource property to a data source.
Look at the FlipViewPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "FlipView",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.flipview.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/flipview"
- }
- ],
- "RelatedControls": [
- "GridView",
- "ListView",
- "SemanticZoom",
- "Hub"
- ]
- },
- {
- "UniqueId": "GridView",
- "Title": "GridView",
- "Subtitle": "Presents a collection of items in rows and columns that can scroll horizontally.",
- "ImagePath": "ms-appx:///Assets/GridView.png",
- "Description": "The GridView lets you show a collection of items arranged in rows and columns that scroll horizontally.",
- "Content": "GridView is an ItemsControl , so it can contain a collection of items of any type. To populate the view, add items to the Items collection, or set the ItemsSource property to a data source.
Set an ItemTemplate to define the look of individual items.
Look at the GridViewPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "GridView",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.gridview.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/lists"
- }
- ],
- "RelatedControls": [
- "ListView",
- "FlipView",
- "SemanticZoom",
- "Hub"
- ]
- },
- {
- "UniqueId": "ListBox",
- "Title": "ListBox",
- "Subtitle": "A control that presents an inline list of items that the user can select from.",
- "ImagePath": "ms-appx:///Assets/ListBox.png",
- "Description": "Use a ListBox when you want the options to be visible all the time or when users can select more than one option at a time. ListBox controls are always open, which allows several items to be displayed to the user without user interaction.",
- "Content": "Look at the ListBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ListBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.listbox.aspx"
- },
- {
- "Title": "ListBoxItem",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.listboxitem.aspx"
- }
- ],
- "RelatedControls": [
- "ComboBox",
- "RadioButton",
- "CheckBox",
- "AutoSuggestBox"
- ]
- },
- {
- "UniqueId": "ListView",
- "Title": "ListView",
- "Subtitle": "Presents a collection of items in a list that can scroll vertically.",
- "ImagePath": "ms-appx:///Assets/ListView.png",
- "Description": "The ListView lets you show a collection of items in a list that scrolls vertically.",
- "Content": "ListView is an ItemsControl , so it can contain a collection of items of any type. To populate the view, add items to the Items collection, or set the ItemsSource property to a data source.
Set an ItemTemplate to define the look of individual items.
Look at the ListViewPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ListView",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.listview.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/lists"
- }
- ],
- "RelatedControls": [
- "GridView",
- "FlipView",
- "SemanticZoom",
- "Hub"
- ]
- },
- {
- "UniqueId": "PullToRefresh",
- "Title": "PullToRefresh",
- "Subtitle": "Provides the ability to pull on a collection of items in a list/grid to refresh the contents of the collection.",
- "ImagePath": "ms-appx:///Assets/PullToRefresh.png",
- "Description": "Released Spring 2018! PullToRefresh Provides the ability to pull on a collection of items in a list/grid to refresh the contents of the collection.",
- "Content": "PullToRefresh can be used for a collection of items of any type. To populate the view, add items to the Items collection, or set the ItemsSource property to a data source.
Set an ItemTemplate to define the look of individual items.
Look at the ListViewPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": true,
- "Docs": [
- {
- "Title": "RefreshContainer",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.RefreshContainer"
- },
- {
-
- "Title": "RefreshVisualizer",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.RefreshVisualizer"
- },
- {
-
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/pull-to-refresh"
- }
- ]
- },
- {
- "UniqueId": "TreeView",
- "Title": "TreeView",
- "Subtitle": "The TreeView control is a hierarchical list pattern with expanding and collapsing nodes that contain nested items.",
- "ImagePath": "ms-appx:///Assets/TreeView.png",
- "Description": "Released Spring 2018! The TreeView control is a hierarchical list pattern with expanding and collapsing nodes that contain nested items. ",
- "Content": "PullToRefresh can be used for a collection of items of any type. To populate the view, add items to the Items collection, or set the ItemsSource property to a data source.
Set an ItemTemplate to define the look of individual items.
Look at the ListViewPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": true,
- "Docs": [
- {
- "Title": "TreeView",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.TreeView"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/tree-view"
- }
- ]
- },
- {
- "UniqueId": "SemanticZoom",
- "Title": "SemanticZoom",
- "Subtitle": "Lets the user zoom between two different views of a collection, making it easier to navigate through large collections of items.",
- "ImagePath": "ms-appx:///Assets/DefaultIcon.png",
- "Description": "The SemanticZoom lets you show grouped data in two different ways, and is useful for quickly navigating through large sets of data.",
- "Content": "Look at the SemanticZoomPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "SemanticZoom",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.semanticzoom.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/semantic-zoom"
- }
- ],
- "RelatedControls": [
- "GridView",
- "ListView",
- "Hub"
- ]
- }
- ]
- },
- {
- "UniqueId": "DataInput",
- "Title": "Data Input",
- "Subtitle": "CheckBox, ComboBox, DatePicker, ListBox, RadioButton, Slider, TimePicker, ToggleSwitch",
- "ImagePath": "ms-appx:///Assets/NavigationViewItemIcons/PickerIcon.png",
- "Description": "Use selection controls to let a user set a value or choose between various options.",
- "Items": [
- {
- "UniqueId": "CalendarDatePicker",
- "Title": "CalendarDatePicker",
- "Subtitle": "A control that lets users pick a date value using a calendar.",
- "ImagePath": "ms-appx:///Assets/CalenderDatePicker.png",
- "Description": "A control that lets users pick a date value using a calendar.",
- "Content": "",
- "IsNew": false,
- "Docs": [
- {
- "Title": "CalendarDatePicker",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.calendardatepicker.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/calendar-date-picker"
- }
- ],
- "RelatedControls": [
- "DatePicker",
- "CalendarView"
- ]
- },
- {
- "UniqueId": "CalendarView",
- "Title": "CalendarView",
- "Subtitle": "A control that presents a calendar for a user to choose a date from.",
- "ImagePath": "ms-appx:///Assets/CalendarView.png",
- "Description": "CalendarView shows a larger view for showing and selecting dates. DatePicker by contrast has a compact view with inline selection.",
- "Content": "Look at the CalendarView.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "CalendarView",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.calendarview.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/calendar-view"
- }
- ],
- "RelatedControls": [
- "CalendarDatePicker",
- "DatePicker",
- "TimePicker"
- ]
- },
- {
- "UniqueId": "CheckBox",
- "Title": "CheckBox",
- "Subtitle": "A control that a user can select or clear.",
- "ImagePath": "ms-appx:///Assets/CheckBox.png",
- "Description": "CheckBox controls let the user select a combination of binary options. In contrast, RadioButton controls allow the user to select from mutually exclusive options. The indeterminate state is used to indicate that an option is set for some, but not all, child options. Don't allow users to set an indeterminate state directly to indicate a third option.",
- "Content": "Check and uncheck these controls to see how they look in each state. The label for each CheckBox is defined by its Content property.
Use a three-state CheckBox to show that none, some, or all of an items sub-options are checked. You have to add some code to do this. Take a look at the methods in the SelectAllMethods region of CheckBoxPage.xaml.cs to see how we did it.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "CheckBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.checkbox.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/checkbox"
- }
- ],
- "RelatedControls": [
- "RadioButton",
- "ToggleSwitch",
- "ToggleButton"
- ]
- },
- {
- "UniqueId": "ColorPicker",
- "Title": "ColorPicker",
- "Subtitle": "A selectable color spectrum.",
- "ImagePath": "ms-appx:///Assets/ColorPicker.png",
- "Description": "Released Fall 2017! A selectable color spectrum.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "ColorPicker",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.ColorPicker"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/color-picker"
- }
- ],
- "RelatedControls": [
- "ComboBox"
- ]
- },
- {
- "UniqueId": "DatePicker",
- "Title": "DatePicker",
- "Subtitle": "A configurable control that lets a user pick a date value.",
- "ImagePath": "ms-appx:///Assets/DatePicker.png",
- "Description": "Use a DatePicker to let users set a date in your app, for example to schedule an appointment. The DatePicker displays three controls for month, date, and year. These controls are easy to use with touch or mouse, and they can be styled and configured in several different ways.",
- "Content": "Look at the DatePickerPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "DatePicker",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.datepicker.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/date-picker"
- }
- ],
- "RelatedControls": [
- "CalendarDatePicker",
- "CalendarView",
- "TimePicker"
- ]
- },
- {
- "UniqueId": "RadioButton",
- "Title": "RadioButton",
- "Subtitle": "A control that allows a user to select a single option from a group of options. When radio buttons are grouped together they are mutually exclusive.",
- "ImagePath": "ms-appx:///Assets/RadioButton.png",
- "Description": "Use RadioButtons to let a user choose between mutually exclusive, related options.",
- "Content": "Look at the RadioButtonPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "RadioButton",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.radiobutton.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/radio-button"
- }
- ],
- "RelatedControls": [
- "CheckBox",
- "ToggleSwitch",
- "ToggleButton"
- ]
- },
- {
- "UniqueId": "RatingControl",
- "Title": "RatingControl",
- "Subtitle": "Rate something 1 to 5 stars.",
- "ImagePath": "ms-appx:///Assets/RatingControl.png",
- "Description": "Released Fall 2017! Rate something 1 to 5 stars.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "RatingControl",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.RatingControl"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.RatingControl"
- }
- ],
- "RelatedControls": [
- "Slider",
- "ComboBox"
- ]
- },
- {
- "UniqueId": "Slider",
- "Title": "Slider",
- "Subtitle": "A control that lets the user select from a range of values by moving a Thumb control along a track.",
- "ImagePath": "ms-appx:///Assets/Slider.png",
- "Description": "Use a Slider when you want your users to be able to set defined, contiguous values (such as volume or brightness) or a range of discrete values (such as screen resolution settings).",
- "Content": "Look at the SliderPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Slider",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.slider.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "http://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/slider"
- }
- ],
- "RelatedControls": [
- "ComboBox",
- "ListBox",
- "RatingControl"
- ]
- },
- {
- "UniqueId": "Sound",
- "Title": "Sound",
- "Subtitle": "A C#-only API that enables 2D and 3D UI sounds on all UWP controls.",
- "ImagePath": "ms-appx:///Assets/Sound.png",
- "Description": "Sound is enabled by default for UWP apps running on Xbox, but can be set to always play on all devices if desired. Sound may also be put into Spatial Audio mode for a more immersive 10ft experience.",
- "Content": "Look at the SoundPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Sound",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.elementsoundplayer"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/style/sound"
- }
- ]
- },
- {
- "UniqueId": "TimePicker",
- "Title": "TimePicker",
- "Subtitle": "A configurable control that lets a user pick a time value.",
- "ImagePath": "ms-appx:///Assets/TimePicker.png",
- "Description": "Use a TimePicker to let users set a time in your app, for example to set a reminder. The TimePicker displays three controls for month, day, and and AM/PM. These controls are easy to use with touch or mouse, and they can be styled and configured in several different ways.",
- "Content": "Look at the TimePickerPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "TimePicker",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.timepicker.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/time-picker"
- }
- ],
- "RelatedControls": [
- "DatePicker",
- "CalendarView"
- ]
- },
- {
- "UniqueId": "ToggleSwitch",
- "Title": "ToggleSwitch",
- "Subtitle": "A switch that can be toggled between 2 states.",
- "ImagePath": "ms-appx:///Assets/ToggleSwitch.png",
- "Description": "Use ToggleSwitch controls to present users with exactly two mutually exclusive options (like on/off), where choosing an option results in an immediate commit. A toggle switch should have a single label.",
- "Content": "Look at the ToggleSwitchPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ToggleSwitch",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.toggleswitch.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/toggles"
- }
- ],
- "RelatedControls": [
- "ToggleButton",
- "RadioButton",
- "CheckBox",
- "AppBarToggleButton"
- ]
- }
- ]
- },
- {
- "UniqueId": "Indicators",
- "Title": "Indicators",
- "Subtitle": "ProgressBar, ProgressRing",
- "ImagePath": "ms-appx:///Assets/NavigationViewItemIcons/ProgressIcon.png",
- "Description": "Use progress controls to graphically represent ongoing activity or the progress of a task.",
- "Items": [
- {
- "UniqueId": "ProgressBar",
- "Title": "ProgressBar",
- "Subtitle": "Shows the apps progress on a task, or that the app is performing ongoing work that doesn't block user interaction.",
- "ImagePath": "ms-appx:///Assets/ProgressBar.png",
- "Description": "The ProgressBar has two different visual representations:\nIndeterminate - shows that a task is ongoing, but doesn't block user interaction.\nDeterminate - shows how much progress has been made on a known amount of work.",
- "Content": "Look at the ProgressBarPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ProgressBar",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.button.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/progress-controls"
- }
- ],
- "RelatedControls": [
- "ProgressRing"
- ]
- },
- {
- "UniqueId": "ProgressRing",
- "Title": "ProgressRing",
- "Subtitle": "Shows that the app is performing ongoing work that blocks user interaction.",
- "ImagePath": "ms-appx:///Assets/ProgressRing.png",
- "Description": "Use a ProgressRing to show that the app is performing ongoing work that blocks user interaction.",
- "Content": "Look at the ProgressRingPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ProgressRing",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.progressring.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/progress-controls"
- }
- ],
- "RelatedControls": [
- "ProgressBar"
- ]
- }
- ]
- },
- {
- "UniqueId": "Layout",
- "Title": "Layout controls",
- "Subtitle": "Border, Canvas, Grid, RelativePanel, ScrollViewer, SplitView, StackPanel, VariableSizedWrapGrid, ViewBox",
- "ImagePath": "\uE80A",
- "Description": "Use layout controls to arrange the controls and content in your app.",
- "Items": [
- {
- "UniqueId": "Border",
- "Title": "Border",
- "Subtitle": "A container control that draws a boundary line, background, or both, around another object.",
- "ImagePath": "ms-appx:///Assets/Border.png",
- "Description": "Use a Border control to draw a boundary line, background, or both, around another object. A Border can contain only one child object.",
- "Content": "A Border can contain only one child object. If you want to put a border around multiple objects, first wrap them in a container object such as StackPanel and make the StackPanel the child of the Border .
You can change the appearance of a Border by setting basic properties:
Width/Height BorderBrush BorderThickness Background
Most of the control pages in this app have XAML blocks to show basic usage. The appearance of the XAML blocks is defined by a Border control. Look at the CodeBorderStyle resource in App.xaml to see the Style that's applied to the Borders.
Look at the BorderPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Border",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.border.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/layout/grid-tutorial"
- }
- ],
- "RelatedControls": [
- "Canvas",
- "Grid",
- "StackPanel",
- "VariableSizedWrapGrid",
- "RelativePanel"
- ]
- },
- {
- "UniqueId": "Canvas",
- "Title": "Canvas",
- "Subtitle": "A layout panel that supports absolute positioning of child elements relative to the top left corner of the canvas.",
- "ImagePath": "ms-appx:///Assets/Canvas.png",
- "Description": "The Canvas provides absolute positioning of controls or content. Content is positioned relative to the Canvas using the Canvas.Top and Canvas.Left attached properties.",
- "Content": "Items are positioned on the Canvas using the Canvas.Top and Canvas.Left attached properties. Use the sliders to change these properties for the red rectangle and see how it moves around.
To see the effect of the ZIndex attached property, make sure the red rectangle is overlapping the other rectangles.
Look at the CanvasPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Canvas",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.canvas.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/layout/layout-panels"
- }
- ],
- "RelatedControls": [
- "Border",
- "Grid",
- "StackPanel",
- "VariableSizedWrapGrid",
- "RelativePanel"
- ]
- },
- {
- "UniqueId": "Flyout",
- "Title": "Flyout",
- "Subtitle": "Shows contextual information and enables user interaction.",
- "ImagePath": "ms-appx:///Assets/Flyout.png",
- "Description": "A Flyout displays lightweight UI that is either information, or requires user interaction. Unlike a dialog, a Flyout can be light dismissed by clicking or tapping off of it. Use it to collect input from the user, show more details about an item, or ask the user to confirm an action.",
- "Content": "Look at the FlyoutPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Flyout",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.flyout.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/dialogs"
- }
- ],
- "RelatedControls": [
- "ContentDialog",
- "MenuFlyout",
- "Button",
- "AppBarButton"
- ]
- },
- {
- "UniqueId": "Grid",
- "Title": "Grid",
- "Subtitle": "A layout panel that supports arranging child elements in rows and columns. ",
- "ImagePath": "ms-appx:///Assets/Grid.png",
- "Description": "The Grid is used to arrange controls and content in rows and columns. Content is positioned in the grid using Grid.Row and Grid.Column attached properties.",
- "Content": "Look at the GridPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Grid",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.grid.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/layout/grid-tutorial"
- }
- ],
- "RelatedControls": [
- "Border",
- "Canvas",
- "StackPanel",
- "VariableSizedWrapGrid",
- "RelativePanel"
- ]
- },
- {
- "UniqueId": "ParallaxView",
- "Title": "ParallaxView",
- "Subtitle": "A container control that provides the parallax effect when scrolling.",
- "ImagePath": "ms-appx:///Assets/ParallaxView.png",
- "Description": "Released Fall 2017! A container control that provides the parallax effect when scrolling.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "ParallaxView",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.Parallaxview"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/motion/parallax"
- }
- ],
- "RelatedControls": [
- "ScrollViewer"
- ]
- },
- {
- "UniqueId": "RelativePanel",
- "Title": "RelativePanel",
- "Subtitle": "A panel that uses relationships between elements to define layout.",
- "ImagePath": "ms-appx:///Assets/RelativePanel.png",
- "Description": "Use a RelativePanel to layout elements by defining the relationships between elements and in relation to the panel.",
- "Content": "Look at the RelativePanelPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "RelativePanel",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.relativepanel.aspx"
- },
- {
- "Title": "Guidance",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/layout/layout-panels"
- }
- ],
- "RelatedControls": [
- "Grid",
- "StackPanel",
- "Border",
- "Canvas",
- "ViewBox"
- ]
- },
- {
- "UniqueId": "ScrollViewer",
- "Title": "ScrollViewer",
- "Subtitle": "A container control that lets the user pan and zoom its content.",
- "ImagePath": "ms-appx:///Assets/ScrollViewer.png",
- "Description": "A ScrollViewer lets a user scroll, pan, and zoom to see content that's larger than the viewable area. Many content controls, like ListView, have ScrollViewers built into their control templates to provide automatic scrolling.",
- "Content": "Look at the ScrollViewerPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ScrollViewer",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.scrollviewer.aspx"
- },
- {
- "Title": "Guidance",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/scroll-controls"
- }
- ],
- "RelatedControls": [
- "ViewBox",
- "Canvas",
- "Grid",
- "StackPanel",
- "RelativePanel",
- "ParallaxView"
- ]
- },
- {
- "UniqueId": "SplitView",
- "Title": "SplitView",
- "Subtitle": "A container that has 2 content areas, with multiple display options for the pane.",
- "ImagePath": "ms-appx:///Assets/SplitView.png",
- "Description": "Use a SplitView to display content, such as navigation options, in a pane on the side. There are multiple options for displaying the pane, namely CompactOverlay, Compact, Overlay, Inline. If you are looking for a reference to the hamburger pattern, please see the links in the documentation below.",
- "Content": "Look at the SplitViewPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "SplitView",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.splitview.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/split-view"
- }
- ],
- "RelatedControls": [
- "StackPanel",
- "ListView",
- "GridView",
- "Grid",
- "RelativePanel"
- ]
- },
- {
- "UniqueId": "StackPanel",
- "Title": "StackPanel",
- "Subtitle": "A layout panel that arranges child elements into a single line that can be oriented horizontally or vertically.",
- "ImagePath": "ms-appx:///Assets/StackPanel.png",
- "Description": "A StackPanel is used to arrange items in a line, either horizontally or vertically.",
- "Content": "Look at the StackPanelPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "StackPanel",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.stackpanel.aspx"
- },
- {
- "Title": "Guidance",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/layout/layout-panels"
- }
- ],
- "RelatedControls": [
- "Border",
- "Canvas",
- "Grid",
- "VariableSizedWrapGrid",
- "RelativePanel"
- ]
- },
- {
- "UniqueId": "ToolTip",
- "Title": "ToolTip",
- "Subtitle": "Displays information for an element in a pop-up window.",
- "ImagePath": "ms-appx:///Assets/ToolTip.png",
- "Description": "A ToolTip shows more information about a UI element. You might show information about what the element does, or what the user should do. The ToolTip is shown when a user hovers over or presses and holds the UI element.",
- "Content": "Look at the ToolTipPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "ToolTip",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.tooltip.aspx"
- },
- {
- "Title": "Guidance",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/tooltips"
- }
- ],
- "RelatedControls": [
- "Flyout",
- "ContentDialog"
- ]
- },
- {
- "UniqueId": "VariableSizedWrapGrid",
- "Title": "VariableSizedWrapGrid",
- "Subtitle": "A layout panel that supports arranging child elements in rows and columns. Each child element can span multiple rows and columns.",
- "ImagePath": "ms-appx:///Assets/VariableSizedWrapGrid.png",
- "Description": "A VariableSizedWrapGrip is used to create grid layouts where content can span multiple rows and columns.",
- "Content": "Elements are arranged in rows or columns that automatically wrap to a new row or column when the MaximumRowsOrColumns value is reached.
Whether elements are arranged in rows or columns is specified by the Orientation property.
Elements can span multiple rows and columns using VariableSizedWrapGrid.RowSpan and VariableSizedWrapGrid.ColumnSpan attached properties.
Elements are sized as specified by the ItemHeight and ItemWidth properties.
Look at the VariableSizedWrapGridPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "VariableSizedWrapGrid",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.variablesizedwrapgrid.aspx"
- },
- {
- "Title": "Guidance",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/layout/layout-panels"
- }
- ],
- "RelatedControls": [
- "Border",
- "Canvas",
- "Grid",
- "StackPanel",
- "RelativePanel"
- ]
- },
- {
- "UniqueId": "ViewBox",
- "Title": "ViewBox",
- "Subtitle": "A container control that scales its content to a specified size.",
- "ImagePath": "ms-appx:///Assets/ViewBox.png",
- "Description": "Use a ViewBox control scale content up or down to a specified size.",
- "Content": "Look at the ViewBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Viewbox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.viewbox.aspx"
- }
- ],
- "RelatedControls": [
- "ScrollViewer",
- "Canvas",
- "Grid",
- "StackPanel",
- "RelativePanel"
- ]
- }
- ]
- },
- {
- "UniqueId": "Navigation",
- "Title": "Navigation",
- "Subtitle": "Button, HyperlinkButton, RepeatButton, ToggleButton",
- "ImagePath": "\uE700",
- "Description": "Use button controls to let users perform an action, like submitting a form or showing a menu.",
- "Items": [
- {
- "UniqueId": "Hub",
- "Title": "Hub",
- "Subtitle": "Presents information from different sources in a scrollable view.",
- "ImagePath": "ms-appx:///Assets/Hub.png",
- "Description": "Use a Hub to display information from different source in a single scrollable view. Hub can also be used to show categorical information in a separated section format.",
- "Content": "This page shows a simplified Hub control with minimal content to demonstrate basic Hub usage. Look at the HubPage.xaml file in Visual Studio to see the full code for this page.
A Hub control typically takes up the full page. The app home uses a more fully implemented Hub that demonstrates this. Look at the MainPage.xaml file in Visual Studio to see the full code for the home page Hub .
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Hub",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.hub.aspx"
- },
- {
- "Title": "HubSection",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.hubsection.aspx"
- },
- {
- "Title": "Guidance",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/hub"
- }
- ],
- "RelatedControls": [
- "Pivot",
- "SemanticZoom",
- "ListView",
- "GridView"
- ]
- },
- {
- "UniqueId": "NavigationView",
- "Title": "NavigationView",
- "Subtitle": "Common vertical layout for top-level areas of your app via a collapsible navigation menu.",
- "ImagePath": "ms-appx:///Assets/NavigationView.png",
- "Description": "Updated Spring 2018! The navigation view control provides a common vertical layout for top-level areas of your app via a collapsible navigation menu.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "NavigationView",
- "Uri": "https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Controls.NavigationView"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview"
- }
- ],
- "RelatedControls": [
- "SplitView",
- "Pivot"
- ]
- },
- {
- "UniqueId": "Pivot",
- "Title": "Pivot",
- "Subtitle": "Presents information from different sources in a tabbed view.",
- "ImagePath": "ms-appx:///Assets/Pivot.png",
- "Description": "A Pivot allows you to show a collection of items from different sources in a tabbed view.",
- "Content": "This page shows a simplified Pivot control with minimal content to demonstrate basic Pivot usage. Look at the PivotPage.xaml file in Visual Studio to see the full code for this page.
A Pivot control typically takes up the full page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Pivot",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.pivot.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/tabs-pivot"
- }
- ],
- "RelatedControls": [
- "Hub",
- "SemanticZoom",
- "ListView",
- "GridView"
- ]
- }
- ]
- },
- {
- "UniqueId": "RichContent",
- "Title": "Rich Content",
- "Subtitle": "Image, InkCanvas, MediaElement",
- "ImagePath": "\uE102",
- "Description": "Use media controls to display images and videos. Use ink to capture strokes and display them.",
- "Items": [
- {
- "UniqueId": "Image",
- "Title": "Image",
- "Subtitle": "A control to display image content.",
- "ImagePath": "ms-appx:///Assets/Image.png",
- "Description": "You can use an Image control to show and scale images.",
- "Content": "Look at the ImagePage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "Image",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.image.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/images-imagebrushes"
- }
- ],
- "RelatedControls": [
- "MediaElement",
- "PersonPicture"
- ]
- },
- {
- "UniqueId": "InkCanvas",
- "Title": "InkCanvas",
- "Subtitle": "A control to capture and display strokes.",
- "ImagePath": "ms-appx:///Assets/InkCanvas.png",
- "Description": "You can use an InkCanvas to capture strokes and display them. You can also change the way the strokes are displayed through the InkDrawingAttributes.",
- "Content": "Look at the InkCanvasPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "InkCanvas",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.inkcanvas.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/inking-controls"
- }
- ],
- "RelatedControls": [
- "Canvas",
- "InkToolbar"
- ]
- },
- {
- "UniqueId": "MediaElement",
- "Title": "MediaElement",
- "Subtitle": "A control to display video and image content.",
- "ImagePath": "ms-appx:///Assets/MediaElement.png",
- "Description": "You can use a MediaElement control to playback videos and show images. You can show transport controls or make the video autoplay.",
- "Content": "Look at the MediaElementPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "MediaElement",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.mediaelement"
- },
- {
- "Title": "Media Playback",
- "Uri": "http://windowsstyleguide/controls-and-patterns/media-playback/"
- }
- ],
- "RelatedControls": [
- "Image",
- "MediaPlayerElement"
- ]
- },
- {
- "UniqueId": "MediaPlayerElement",
- "Title": "MediaPlayerElement",
- "Subtitle": "A control to display video and image content.",
- "ImagePath": "ms-appx:///Assets/MediaElement.png",
- "Description": "This control is the newer version of MediaElement.",
- "Content": "",
- "IsNew": false,
- "Docs": [
- {
- "Title": "MediaPlayerElement",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.MediaPlayerElement"
- },
- {
- "Title": "Media Playback",
- "Uri": "http://windowsstyleguide/controls-and-patterns/media-playback/"
- }
- ],
- "RelatedControls": [
- "Image",
- "MediaElement"
- ]
- },
- {
- "UniqueId": "PersonPicture",
- "Title": "PersonPicture",
- "Subtitle": "Displays the picture of a person/contact.",
- "ImagePath": "ms-appx:///Assets/PersonPicture.png",
- "Description": "Released Fall 2017! Displays the picture of a person/contact.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "PersonPicture",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.PersonPicture"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/person-picture"
- }
- ],
- "RelatedControls": [
- "Image"
- ]
- }
- ]
- },
- {
- "UniqueId": "Styles",
- "Title": "Styles",
- "Subtitle": "Acrylic and Reveal",
- "ImagePath": "\uE2B1",
- "Description": "Acrylic and Reveal",
- "Items": [
- {
- "UniqueId": "Acrylic",
- "Title": "Acrylic",
- "Subtitle": "A translucent material recommended for panel backgrounds.",
- "ImagePath": "ms-appx:///Assets/AcrylicBrush.png",
- "Description": "Released Fall 2017! A translucent material recommended for panel backgrounds.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "Acrylic",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.acrylicbrush"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/style/acrylic"
- }
- ],
- "RelatedControls": [
- "Reveal"
- ]
- },
- {
- "UniqueId": "Reveal",
- "Title": "Reveal",
- "Subtitle": "A material that changes color near the mouse.",
- "ImagePath": "ms-appx:///Assets/Reveal.png",
- "Description": "Updated Spring 2018! A material that changes color near the mouse.",
- "Content": "",
- "IsNew": true,
- "Docs": [
- {
- "Title": "RevealBrush",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.revealbrush"
- },
- {
- "Title": "RevealBackgroundBrush",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.revealbackgroundbrush"
- },
- {
- "Title": "RevealBorderBrush",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.revealborderbrush"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/style/reveal"
- }
- ],
- "RelatedControls": [
- "Acrylic"
- ]
- },
- {
- "UniqueId": "RevealFocus",
- "Title": "Reveal Focus",
- "Subtitle": "Customize the style of your focus rectangles.",
- "ImagePath": "ms-appx:///Assets/RevealFocus.png",
- "Description": "Released Spring 2018! Reveal focus allows you to adapt focus rectangles to look like the focus rectangles available on Xbox.",
- "Content": "Look at the RevealFocusPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": true,
- "Docs": [
- {
- "Title": "Reveal Focus",
- "Uri": "https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.application#Windows_UI_Xaml_Application_FocusVisualKind"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/style/reveal-focus"
- }
- ],
- "RelatedControls": [
- "Reveal"
- ]
- }
-
- ]
- },
- {
- "UniqueId": "Text",
- "Title": "Text controls",
- "Subtitle": "AutoSuggestBox, PasswordBox, RichEditBox, RichTextBlock, TextBlock, TextBox",
- "ImagePath": "ms-appx:///Assets/NavigationViewItemIcons/TextIcon.png",
- "Description": "Use text controls to display or edit plain text and other rich content.",
- "Items": [
- {
- "UniqueId": "AutoSuggestBox",
- "Title": "AutoSuggestBox",
- "Subtitle": "A control to provide suggestions as a user is typing.",
- "ImagePath": "ms-appx:///Assets/AutoSuggestBox.png",
- "Description": "A text control that makes suggestions to users as they type. The app is notified when text has been changed by the user and is responsible for providing relevant suggestions for this control to display.",
- "Content": "Look at the AutoSuggestBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "AutoSuggestBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.autosuggestbox.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/auto-suggest-box"
- }
- ],
- "RelatedControls": [
- "ListBox",
- "ComboBox",
- "TextBox"
- ]
- },
- {
- "UniqueId": "PasswordBox",
- "Title": "PasswordBox",
- "Subtitle": "A control for entering passwords.",
- "ImagePath": "ms-appx:///Assets/PasswordBox.png",
- "Description": "A user can enter a single line of non-wrapping text in a PasswordBox control. The text is masked by characters that you can specify by using the PasswordChar property, and you can specify the maximum number of characters that the user can enter by setting the MaxLength property.",
- "Content": "Look at the PasswordBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "PasswordBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.passwordbox.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/text-controls"
- }
- ],
- "RelatedControls": [
- "TextBox",
- "TextBlock",
- "RichTextBlock",
- "RichEditBox"
- ]
- },
- {
- "UniqueId": "RichEditBox",
- "Title": "RichEditBox",
- "Subtitle": "A rich text editing control that supports formatted text, hyperlinks, and other rich content.",
- "ImagePath": "ms-appx:///Assets/RichEditBox.png",
- "Description": "You can use a RichEditBox control to enter and edit rich text documents that contain formatted text, hyperlinks, and images. By default, the RichEditBox supports spell checking. You can make a RichEditBox read-only by setting its IsReadOnly property to true.",
- "Content": "On this page, you can type into the RichTextBox control and save it as a RichTextFormat (.rtf) document, or load an existing .rtf document. You can format the text as Bold or Underlined , and change the text color.
Look at the RichEditBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "RichEditBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.richeditbox.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/text-controls"
- }
- ],
- "RelatedControls": [
- "TextBox",
- "RichTextBlock",
- "TextBlock"
- ]
- },
- {
- "UniqueId": "RichTextBlock",
- "Title": "RichTextBlock",
- "Subtitle": "A control that displays formatted text, hyperlinks, inline images, and other rich content.",
- "ImagePath": "ms-appx:///Assets/RichTextBlock.png",
- "Description": "RichTextBlock provides more advanced formatting features than the TextBlock control. You can apply character and paragraph formatting to the text in the RichTextBlock. For example, you can apply Bold, Italic, and Underline to any portion of the text in the control. You can use linked text containers (a RichTextBlock linked to RichTextBlockOverflow elements) to create advanced page layouts.",
- "Content": "Change the width of the app to see how the RichTextBlock overflows into additional columns as the app gets narrower.
Look at the RichTextBlockPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "RichTextBlock",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.richtextblock.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/text-controls"
- }
- ],
- "RelatedControls": [
- "TextBlock",
- "TextBox",
- "PasswordBox",
- "RichEditBox",
- "WebView"
- ]
- },
- {
- "UniqueId": "TextBlock",
- "Title": "TextBlock",
- "Subtitle": "A lightweight control for displaying small amounts of text.",
- "ImagePath": "ms-appx:///Assets/TextBlock.png",
- "Description": "TextBlock is the primary control for displaying read-only text in your app. You typically display text by setting the Text property to a simple string. You can also display a series of strings in Run elements and give each different formatting.",
- "Content": "Look at the TextBlockPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "TextBlock",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.textblock.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/text-controls"
- }
- ],
- "RelatedControls": [
- "TextBox",
- "RichTextBlock",
- "PasswordBox",
- "RichEditBox"
- ]
- },
- {
- "UniqueId": "TextBox",
- "Title": "TextBox",
- "Subtitle": "A single-line or multi-line plain text field.",
- "ImagePath": "ms-appx:///Assets/TextBox.png",
- "Description": "Use a TextBox to let a user enter simple text input in your app. You can add a header and placeholder text to let the user know what the TextBox is for, and you can customize it in other ways.",
- "Content": "Look at the TextBoxPage.xaml file in Visual Studio to see the full code for this page.
",
- "IsNew": false,
- "Docs": [
- {
- "Title": "TextBox",
- "Uri": "http://msdn.microsoft.com/library/windows/apps/windows.ui.xaml.controls.textbox.aspx"
- },
- {
- "Title": "Guidelines",
- "Uri": "https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/text-controls"
- }
- ],
- "RelatedControls": [
- "TextBlock",
- "RichTextBlock",
- "PasswordBox",
- "RichEditBox",
- "AutoSuggestBox"
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/DataModel/ControlInfoDataSource.cs b/Samples/XamlUIBasics/cs/AppUIBasics/DataModel/ControlInfoDataSource.cs
deleted file mode 100644
index 822feede84..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/DataModel/ControlInfoDataSource.cs
+++ /dev/null
@@ -1,242 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Threading.Tasks;
-using Windows.Data.Json;
-using Windows.Storage;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Media.Imaging;
-
-// The data model defined by this file serves as a representative example of a strongly-typed
-// model. The property names chosen coincide with data bindings in the standard item templates.
-//
-// Applications may use this model as a starting point and build on it, or discard it entirely and
-// replace it with something appropriate to their needs. If using this model, you might improve app
-// responsiveness by initiating the data loading task in the code behind for App.xaml when the app
-// is first launched.
-
-namespace AppUIBasics.Data
-{
- ///
- /// Generic item data model.
- ///
- public class ControlInfoDataItem
- {
- public ControlInfoDataItem(String uniqueId, String title, String subtitle, String imagePath, String description, String content, bool isNew)
- {
- this.UniqueId = uniqueId;
- this.Title = title;
- this.Subtitle = subtitle;
- this.Description = description;
- this.ImagePath = imagePath;
- this.Content = content;
- this.IsNew = isNew;
- this.Docs = new ObservableCollection();
- this.RelatedControls = new ObservableCollection();
- }
-
- public string UniqueId { get; private set; }
- public string Title { get; private set; }
- public string Subtitle { get; private set; }
- public string Description { get; private set; }
- public string ImagePath { get; private set; }
- public string Content { get; private set; }
- public bool IsNew { get; private set; }
- public ObservableCollection Docs { get; private set; }
- public ObservableCollection RelatedControls { get; private set; }
-
- public override string ToString()
- {
- return this.Title;
- }
- }
-
- public class ControlInfoDocLink
- {
- public ControlInfoDocLink(string title, string uri)
- {
- this.Title = title;
- this.Uri = uri;
- }
- public string Title { get; private set; }
- public string Uri { get; private set; }
- }
-
-
- ///
- /// Generic group data model.
- ///
- public class ControlInfoDataGroup
- {
- public ControlInfoDataGroup(String uniqueId, String title, String subtitle, String imagePath, String description)
- {
- this.UniqueId = uniqueId;
- this.Title = title;
- this.Subtitle = subtitle;
- this.Description = description;
- this.ImagePath = imagePath;
- this.Items = new ObservableCollection();
- }
-
- public string UniqueId { get; private set; }
- public string Title { get; private set; }
- public string Subtitle { get; private set; }
- public string Description { get; private set; }
- public string ImagePath { get; private set; }
- public ObservableCollection Items { get; private set; }
-
- public override string ToString()
- {
- return this.Title;
- }
- }
-
- ///
- /// Creates a collection of groups and items with content read from a static json file.
- ///
- /// ControlInfoSource initializes with data read from a static json file included in the
- /// project. This provides sample data at both design-time and run-time.
- ///
- public sealed class ControlInfoDataSource
- {
- private static readonly object _lock = new object();
-
- #region Singleton
-
- private static ControlInfoDataSource _instance;
-
- public static ControlInfoDataSource Instance
- {
- get
- {
- return _instance;
- }
- }
-
- static ControlInfoDataSource()
- {
- _instance = new ControlInfoDataSource();
- }
-
- private ControlInfoDataSource() { }
-
- #endregion
-
- private IList _groups = new List();
- public IList Groups
- {
- get { return this._groups; }
- }
-
- public async Task> GetGroupsAsync()
- {
- await _instance.GetControlInfoDataAsync();
-
- return _instance.Groups;
- }
-
- public async Task GetGroupAsync(string uniqueId)
- {
- await _instance.GetControlInfoDataAsync();
- // Simple linear search is acceptable for small data sets
- var matches = _instance.Groups.Where((group) => group.UniqueId.Equals(uniqueId));
- if (matches.Count() == 1) return matches.First();
- return null;
- }
-
- public async Task GetItemAsync(string uniqueId)
- {
- await _instance.GetControlInfoDataAsync();
- // Simple linear search is acceptable for small data sets
- var matches = _instance.Groups.SelectMany(group => group.Items).Where((item) => item.UniqueId.Equals(uniqueId));
- if (matches.Count() > 0) return matches.First();
- return null;
- }
-
- public async Task GetGroupFromItemAsync(string uniqueId)
- {
- await _instance.GetControlInfoDataAsync();
- var matches = _instance.Groups.Where((group) => group.Items.FirstOrDefault(item => item.UniqueId.Equals(uniqueId)) != null);
- if (matches.Count() == 1) return matches.First();
- return null;
- }
-
- private async Task GetControlInfoDataAsync()
- {
- lock (_lock)
- {
- if (this.Groups.Count() != 0)
- {
- return;
- }
- }
-
- Uri dataUri = new Uri("ms-appx:///DataModel/ControlInfoData.json");
-
- StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri);
- string jsonText = await FileIO.ReadTextAsync(file);
-
- JsonObject jsonObject = JsonObject.Parse(jsonText);
- JsonArray jsonArray = jsonObject["Groups"].GetArray();
-
- lock (_lock)
- {
- foreach (JsonValue groupValue in jsonArray)
- {
- JsonObject groupObject = groupValue.GetObject();
- ControlInfoDataGroup group = new ControlInfoDataGroup(groupObject["UniqueId"].GetString(),
- groupObject["Title"].GetString(),
- groupObject["Subtitle"].GetString(),
- groupObject["ImagePath"].GetString(),
- groupObject["Description"].GetString());
-
- foreach (JsonValue itemValue in groupObject["Items"].GetArray())
- {
- JsonObject itemObject = itemValue.GetObject();
- var item = new ControlInfoDataItem(itemObject["UniqueId"].GetString(),
- itemObject["Title"].GetString(),
- itemObject["Subtitle"].GetString(),
- itemObject["ImagePath"].GetString(),
- itemObject["Description"].GetString(),
- itemObject["Content"].GetString(),
- itemObject["IsNew"].GetBoolean());
-
- if (itemObject.ContainsKey("Docs"))
- {
- foreach (JsonValue docValue in itemObject["Docs"].GetArray())
- {
- JsonObject docObject = docValue.GetObject();
- item.Docs.Add(new ControlInfoDocLink(docObject["Title"].GetString(), docObject["Uri"].GetString()));
- }
- }
-
- if (itemObject.ContainsKey("RelatedControls"))
- {
- foreach (JsonValue relatedControlValue in itemObject["RelatedControls"].GetArray())
- {
- item.RelatedControls.Add(relatedControlValue.GetString());
- }
- }
-
- group.Items.Add(item);
- }
-
- if (!Groups.Any(g => g.Title == group.Title))
- {
- Groups.Add(group);
- }
- }
- }
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ItemPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ItemPage.xaml
deleted file mode 100644
index fd8db37ebf..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ItemPage.xaml
+++ /dev/null
@@ -1,235 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ItemPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ItemPage.xaml.cs
deleted file mode 100644
index ff6527583d..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ItemPage.xaml.cs
+++ /dev/null
@@ -1,258 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Common;
-using AppUIBasics.Data;
-using System;
-using System.Linq;
-using System.Numerics;
-using Windows.ApplicationModel.Resources;
-using Windows.Foundation;
-using Windows.System;
-using Windows.UI.Composition;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Controls.Primitives;
-using Windows.UI.Xaml.Hosting;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media.Animation;
-using Windows.UI.Xaml.Navigation;
-
-namespace AppUIBasics
-{
- ///
- /// A page that displays details for a single item within a group.
- ///
- public partial class ItemPage : Page
- {
- private Compositor _compositor;
- private ControlInfoDataItem _item;
- private ElementTheme? _currentElementTheme;
-
- public ControlInfoDataItem Item
- {
- get { return _item; }
- set { _item = value; }
- }
-
- public ItemPage()
- {
- this.InitializeComponent();
-
- LayoutVisualStates.CurrentStateChanged += (s, e) => UpdateSeeAlsoPanelVerticalTranslationAnimation();
- Loaded += (s,e) => SetInitialVisuals();
- }
-
- public void SetInitialVisuals()
- {
- NavigationRootPage.Current.PageHeader.TopCommandBar.Visibility = Visibility.Visible;
- NavigationRootPage.Current.PageHeader.ToggleThemeAction = OnToggleTheme;
-
- if (NavigationRootPage.Current.IsFocusSupported)
- {
- this.Focus(FocusState.Programmatic);
- }
-
- _compositor = ElementCompositionPreview.GetElementVisual(this).Compositor;
-
- UpdateSeeAlsoPanelVerticalTranslationAnimation();
- }
-
- private void UpdateSeeAlsoPanelVerticalTranslationAnimation()
- {
- var isEnabled = LayoutVisualStates.CurrentState == LargeLayout;
-
- ElementCompositionPreview.SetIsTranslationEnabled(seeAlsoPanel, true);
-
- var targetPanelVisual = ElementCompositionPreview.GetElementVisual(seeAlsoPanel);
- targetPanelVisual.Properties.InsertVector3("Translation", Vector3.Zero);
-
- if (isEnabled)
- {
- var scrollProperties = ElementCompositionPreview.GetScrollViewerManipulationPropertySet(svPanel);
-
- var expression = _compositor.CreateExpressionAnimation("ScrollManipulation.Translation.Y * -1");
- expression.SetReferenceParameter("ScrollManipulation", scrollProperties);
- expression.Target = "Translation.Y";
- targetPanelVisual.StartAnimation(expression.Target, expression);
- }
- else
- {
- targetPanelVisual.StopAnimation("Translation.Y");
- }
- }
-
- private void OnToggleTheme()
- {
- var currentElementTheme = ((_currentElementTheme ?? ElementTheme.Default) == ElementTheme.Default) ? App.ActualTheme : _currentElementTheme.Value;
- var newTheme = currentElementTheme == ElementTheme.Dark ? ElementTheme.Light : ElementTheme.Dark;
- SetControlExamplesTheme(newTheme);
- }
-
- private void SetControlExamplesTheme(ElementTheme theme)
- {
- var controlExamples = (this.contentFrame.Content as UIElement)?.GetDescendantsOfType();
-
- if (controlExamples != null)
- {
- _currentElementTheme = theme;
- foreach (var controlExample in controlExamples)
- {
- var exampleContent = controlExample.Example as FrameworkElement;
- exampleContent.RequestedTheme = theme;
- controlExample.ExampleContainer.RequestedTheme = theme;
- }
- }
- }
-
- private void OnRelatedControlClick(object sender, RoutedEventArgs e)
- {
- ButtonBase b = (ButtonBase)sender;
-
- this.Frame.Navigate(typeof(ItemPage), b.DataContext.ToString());
- }
-
- protected override async void OnNavigatedTo(NavigationEventArgs e)
- {
- //Connected Animation
-
- PopOutStoryboard.Begin();
- PopOutStoryboard.Completed += (sender1_, e1_) =>
- {
- PopInStoryboard.Begin();
- };
-
- if (NavigationRootPage.Current.PageHeader != null)
- {
- var connectedAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("controlAnimation");
-
- if (connectedAnimation != null)
- {
- var target = NavigationRootPage.Current.PageHeader.TitlePanel;
- connectedAnimation.TryStart(target, new UIElement[] { subTitleText });
- }
- }
-
- var item = await ControlInfoDataSource.Instance.GetItemAsync((String)e.Parameter);
-
- if (item != null)
- {
- Item = item;
-
- // Load control page into frame.
- var loader = ResourceLoader.GetForCurrentView();
-
- string pageRoot = loader.GetString("PageStringRoot");
-
- string pageString = pageRoot + item.UniqueId + "Page";
- Type pageType = Type.GetType(pageString);
-
- if (pageType != null)
- {
- this.contentFrame.Navigate(pageType);
- }
-
- NavigationRootPage.Current.NavigationView.Header = item?.Title;
- if (item.IsNew && NavigationRootPage.Current.CheckNewControlSelected())
- {
- return;
- }
-
- ControlInfoDataGroup group = await ControlInfoDataSource.Instance.GetGroupFromItemAsync((String)e.Parameter);
- var menuItem = NavigationRootPage.Current.NavigationView.MenuItems.Cast().FirstOrDefault(m => m.Tag?.ToString() == group.UniqueId);
- if (menuItem != null)
- {
- menuItem.IsSelected = true;
- }
- }
-
- base.OnNavigatedTo(e);
- }
-
- protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
- {
- SetControlExamplesTheme(App.ActualTheme);
-
- base.OnNavigatingFrom(e);
- }
-
- protected override void OnNavigatedFrom(NavigationEventArgs e)
- {
- NavigationRootPage.Current.PageHeader.TopCommandBar.Visibility = Visibility.Collapsed;
- NavigationRootPage.Current.PageHeader.ToggleThemeAction = null;
-
- //Reverse Connected Animation
- if (e.SourcePageType != typeof(ItemPage))
- {
- var target = NavigationRootPage.Current.PageHeader.TitlePanel;
- ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("controlAnimation", target);
- }
-
- base.OnNavigatedFrom(e);
- }
-
- private void OnSvPanelLoaded(object sender, RoutedEventArgs e)
- {
- svPanel.XYFocusDown = contentFrame.GetDescendantsOfType().FirstOrDefault(c => c.IsTabStop) ?? svPanel.GetDescendantsOfType().FirstOrDefault(c => c.IsTabStop);
- }
-
- private void OnSvPanelGotFocus(object sender, RoutedEventArgs e)
- {
- if (e.OriginalSource == sender && NavigationRootPage.Current.IsFocusSupported)
- {
- bool isElementFound = false;
- var elements = contentFrame.GetDescendantsOfType().Where(c => c.IsTabStop);
- foreach (var element in elements)
- {
- Rect elementRect = element.TransformToVisual(svPanel).TransformBounds(new Rect(0.0, 0.0, element.ActualWidth, element.ActualHeight));
- Rect panelRect = new Rect(0.0, 70.0, svPanel.ActualWidth, svPanel.ActualHeight);
-
- if (elementRect.Top < panelRect.Bottom)
- {
- element.Focus(FocusState.Programmatic);
- isElementFound = true;
- break;
- }
- }
- if (!isElementFound)
- {
- svPanel.UseSystemFocusVisuals = true;
- }
- }
- }
-
- private void OnSvPanelKeyDown(object sender, KeyRoutedEventArgs e)
- {
- if (e.Key == VirtualKey.Up)
- {
- var nextElement = FocusManager.FindNextElement(FocusNavigationDirection.Up);
- if (nextElement.GetType() == typeof(NavigationViewItem))
- {
- NavigationRootPage.Current.PageHeader.Focus(FocusState.Programmatic);
- }
- else
- {
- FocusManager.TryMoveFocus(FocusNavigationDirection.Up);
- }
- }
- }
-
- private void OnContentRootSizeChanged(object sender, SizeChangedEventArgs e)
- {
- string targetState = "NormalFrameContent";
-
- if ((contentColumn.ActualWidth) >= 1000)
- {
- targetState = "WideFrameContent";
- }
-
- VisualStateManager.GoToState(this, targetState, false);
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ItemTemplates.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/ItemTemplates.xaml
deleted file mode 100644
index 85a0f1c6c4..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ItemTemplates.xaml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ItemTemplates.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ItemTemplates.xaml.cs
deleted file mode 100644
index 5547705661..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ItemTemplates.xaml.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using Windows.UI.Xaml;
-
-namespace AppUIBasics
-{
- public sealed partial class ItemTemplates : ResourceDictionary
- {
- public ItemTemplates()
- {
- this.InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/ItemsPageBase.cs b/Samples/XamlUIBasics/cs/AppUIBasics/ItemsPageBase.cs
deleted file mode 100644
index d342ad0beb..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/ItemsPageBase.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Data;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using Windows.System;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media.Animation;
-
-namespace AppUIBasics
-{
- public abstract class ItemsPageBase : Page, INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
-
- private string _itemId;
- private IEnumerable _items;
-
- public IEnumerable Items
- {
- get { return _items; }
- set { SetProperty(ref _items, value); }
- }
-
- ///
- /// Gets a value indicating whether the application's view is currently in "narrow" mode - i.e. on a mobile-ish device.
- ///
- protected virtual bool GetIsNarrowLayoutState()
- {
- throw new NotImplementedException();
- }
-
- protected void OnItemGridViewContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)
- {
- if (sender.ContainerFromItem(sender.Items.LastOrDefault()) is GridViewItem container)
- {
- container.XYFocusDown = container;
- }
- }
-
- protected void OnItemGridViewItemClick(object sender, ItemClickEventArgs e)
- {
- var gridView = (GridView)sender;
- var item = (ControlInfoDataItem)e.ClickedItem;
-
- _itemId = item.UniqueId;
-
- if (gridView.ContainerFromItem(item) is GridViewItem)
- {
- gridView.PrepareConnectedAnimation("controlAnimation", item, "controlRoot");
- }
-
- this.Frame.Navigate(typeof(ItemPage), _itemId);
- }
-
- protected void OnItemGridViewKeyDown(object sender, KeyRoutedEventArgs e)
- {
- if (e.Key == VirtualKey.Up)
- {
- var nextElement = FocusManager.FindNextElement(FocusNavigationDirection.Up);
- if (nextElement.GetType() == typeof(NavigationViewItem))
- {
- NavigationRootPage.Current.PageHeader.Focus(FocusState.Programmatic);
- }
- else
- {
- FocusManager.TryMoveFocus(FocusNavigationDirection.Up);
- }
- }
- }
-
- protected async void OnItemGridViewLoaded(object sender, RoutedEventArgs e)
- {
- if (_itemId != null)
- {
- var gridView = (GridView)sender;
- var items = gridView.ItemsSource as IEnumerable;
- var item = items?.FirstOrDefault(s => s.UniqueId == _itemId);
- if (item != null)
- {
- gridView.ScrollIntoView(item);
-
- if (NavigationRootPage.Current.IsFocusSupported)
- {
- ((GridViewItem)gridView.ContainerFromItem(item))?.Focus(FocusState.Programmatic);
- }
-
- ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("controlAnimation");
-
- if (animation != null)
- {
- await gridView.TryStartConnectedAnimationAsync(animation, item, "controlRoot");
- }
- }
- }
- }
-
- protected void OnItemGridViewSizeChanged(object sender, SizeChangedEventArgs e)
- {
- var gridView = (GridView)sender;
-
- if (gridView.ItemsPanelRoot is ItemsWrapGrid wrapGrid)
- {
- if (GetIsNarrowLayoutState())
- {
- wrapGrid.ItemWidth = gridView.ActualWidth - gridView.Padding.Left - gridView.Padding.Right;
- }
- else
- {
- wrapGrid.ItemWidth = double.NaN;
- }
- }
- }
-
- protected bool SetProperty(ref T storage, T value, [CallerMemberName] String propertyName = null)
- {
- if (Equals(storage, value)) return false;
-
- storage = value;
- NotifyPropertyChanged(propertyName);
- return true;
- }
-
- protected void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Navigation/NavigationRootPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/Navigation/NavigationRootPage.xaml
deleted file mode 100644
index 27f241c439..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/Navigation/NavigationRootPage.xaml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Navigation/NavigationRootPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/Navigation/NavigationRootPage.xaml.cs
deleted file mode 100644
index e20d0d319a..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/Navigation/NavigationRootPage.xaml.cs
+++ /dev/null
@@ -1,275 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Common;
-using AppUIBasics.Data;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using Windows.ApplicationModel.Core;
-using Windows.Devices.Input;
-using Windows.Gaming.Input;
-using Windows.System;
-using Windows.System.Profile;
-using Windows.UI.ViewManagement;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Automation;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Media;
-using Windows.UI.Xaml.Navigation;
-
-namespace AppUIBasics
-{
- public sealed partial class NavigationRootPage : Page
- {
- public static NavigationRootPage Current;
- public static Frame RootFrame = null;
-
- private RootFrameNavigationHelper _navHelper;
- private PageHeader _header;
- private bool _isGamePadConnected;
- private bool _isKeyboardConnected;
- private NavigationViewItem _allControlsMenuItem;
- private NavigationViewItem _newControlsMenuItem;
-
- public NavigationView NavigationView
- {
- get { return NavigationViewControl; }
- }
-
- public DeviceType DeviceFamily { get; set; }
-
- public bool IsFocusSupported
- {
- get
- {
- return DeviceFamily == DeviceType.Xbox || _isGamePadConnected || _isKeyboardConnected;
- }
- }
-
- public PageHeader PageHeader
- {
- get
- {
- return _header ?? (_header = UIHelper.GetDescendantsOfType(NavigationViewControl).FirstOrDefault());
- }
- }
-
- public NavigationRootPage()
- {
- this.InitializeComponent();
-
- _navHelper = new RootFrameNavigationHelper(rootFrame, NavigationViewControl);
-
- SetDeviceFamily();
- AddNavigationMenuItems();
- Current = this;
- RootFrame = rootFrame;
-
- this.GotFocus += (object sender, RoutedEventArgs e) =>
- {
- // helpful for debugging focus problems w/ keyboard & gamepad
- if (FocusManager.GetFocusedElement() is FrameworkElement focus)
- {
- Debug.WriteLine("got focus: " + focus.Name + " (" + focus.GetType().ToString() + ")");
- }
- };
-
- this.Loaded += (s, e) =>
- {
- // This is to work around a bug in the NavigationView header that hard-codes the header content to a 48 pixel height.
- var headerContentControl = NavigationViewControl.GetDescendantsOfType().Where(c => c.Name == "HeaderContent").FirstOrDefault();
-
- if (headerContentControl != null)
- {
- headerContentControl.Height = double.NaN;
- }
- };
-
- Gamepad.GamepadAdded += OnGamepadAdded;
- Gamepad.GamepadRemoved += OnGamepadRemoved;
-
- Window.Current.CoreWindow.SizeChanged += (s, e) => UpdateAppTitle();
- CoreApplication.GetCurrentView().TitleBar.LayoutMetricsChanged += (s, e) => UpdateAppTitle();
-
- _isKeyboardConnected = Convert.ToBoolean(new KeyboardCapabilities().KeyboardPresent);
- }
-
- void UpdateAppTitle()
- {
- var full = (ApplicationView.GetForCurrentView().IsFullScreenMode);
- var left = 12 + (full ? 0 : CoreApplication.GetCurrentView().TitleBar.SystemOverlayLeftInset);
- AppTitle.Margin = new Thickness(left, 8, 0, 0);
- }
-
- public bool CheckNewControlSelected()
- {
- return _newControlsMenuItem.IsSelected;
- }
-
- private void AddNavigationMenuItems()
- {
- foreach (var group in ControlInfoDataSource.Instance.Groups)
- {
- var item = new NavigationViewItem() { Content = group.Title, Tag = group.UniqueId, DataContext = group };
- AutomationProperties.SetName(item, group.Title);
- if (group.ImagePath.ToLowerInvariant().EndsWith(".png"))
- {
- item.Icon = new BitmapIcon() { UriSource = new Uri(group.ImagePath, UriKind.RelativeOrAbsolute) };
- }
- else
- {
- item.Icon = new FontIcon()
- {
- FontFamily = new FontFamily("Segoe MDL2 Assets"),
- Glyph = group.ImagePath
- };
- }
- NavigationViewControl.MenuItems.Add(item);
- }
-
- this._allControlsMenuItem = (NavigationViewItem)NavigationViewControl.MenuItems[0];
-
- _allControlsMenuItem.Loaded += OnAllControlsMenuItemLoaded;
-
- this._newControlsMenuItem = (NavigationViewItem)NavigationViewControl.MenuItems[1];
- }
-
- private void SetDeviceFamily()
- {
- var familyName = AnalyticsInfo.VersionInfo.DeviceFamily;
-
- if (!Enum.TryParse(familyName.Replace("Windows.", string.Empty), out DeviceType parsedDeviceType))
- {
- parsedDeviceType = DeviceType.Other;
- }
-
- DeviceFamily = parsedDeviceType;
- }
-
- private void OnAllControlsMenuItemLoaded(object sender, RoutedEventArgs e)
- {
- if (IsFocusSupported)
- {
- _allControlsMenuItem.Focus(FocusState.Keyboard);
- }
- }
-
- private void OnGamepadRemoved(object sender, Gamepad e)
- {
- _isGamePadConnected = Gamepad.Gamepads.Any();
- }
-
- private void OnGamepadAdded(object sender, Gamepad e)
- {
- _isGamePadConnected = Gamepad.Gamepads.Any();
- }
-
- private void OnNavigationViewItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
- {
- if (args.IsSettingsInvoked)
- {
- if (NavigationViewControl.SelectedItem != NavigationViewControl.SettingsItem)
- {
- rootFrame.Navigate(typeof(SettingsPage));
- }
- }
- else
- {
- var invokedItem = NavigationView.MenuItems.Cast().Single(i => i.Content == args.InvokedItem);
-
- if (invokedItem == _allControlsMenuItem)
- {
- rootFrame.Navigate(typeof(AllControlsPage));
- }
- else if (invokedItem == _newControlsMenuItem)
- {
- rootFrame.Navigate(typeof(NewControlsPage));
- }
- else
- {
- var itemId = ((ControlInfoDataGroup)invokedItem.DataContext).UniqueId;
- rootFrame.Navigate(typeof(SectionPage), itemId);
- }
- }
- }
-
- private void OnRootFrameNavigated(object sender, NavigationEventArgs e)
- {
- if (e.SourcePageType == typeof(AllControlsPage) ||
- e.SourcePageType == typeof(NewControlsPage))
- {
- NavigationViewControl.AlwaysShowHeader = false;
- }
- else
- {
- NavigationViewControl.AlwaysShowHeader = true;
-
- bool isFilteredPage = e.SourcePageType == typeof(SectionPage) || e.SourcePageType == typeof(SearchResultsPage);
- PageHeader?.UpdateBackground(isFilteredPage);
- }
- }
-
- private void OnControlsSearchBoxTextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
- {
- if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
- {
- var suggestions = new List();
-
- foreach (var group in ControlInfoDataSource.Instance.Groups)
- {
- var matchingItems = group.Items.Where(
- item => item.Title.IndexOf(sender.Text, StringComparison.CurrentCultureIgnoreCase) >= 0);
-
- foreach (var item in matchingItems)
- {
- suggestions.Add(item);
- }
- }
- if (suggestions.Count > 0)
- {
- controlsSearchBox.ItemsSource = suggestions.OrderByDescending(i => i.Title.StartsWith(sender.Text, StringComparison.CurrentCultureIgnoreCase)).ThenBy(i => i.Title);
- }
- else
- {
- controlsSearchBox.ItemsSource = new string[] { "No results found" };
- }
- }
- }
-
- private void OnControlsSearchBoxQuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
- {
- if (args.ChosenSuggestion != null && args.ChosenSuggestion is ControlInfoDataItem)
- {
- var itemId = (args.ChosenSuggestion as ControlInfoDataItem).UniqueId;
- NavigationRootPage.RootFrame.Navigate(typeof(ItemPage), itemId);
- }
- else if (!string.IsNullOrEmpty(args.QueryText))
- {
- NavigationRootPage.RootFrame.Navigate(typeof(SearchResultsPage), args.QueryText);
- }
- }
-
- private void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
- {
- controlsSearchBox.Focus(FocusState.Keyboard);
- }
- }
-
-
- public enum DeviceType
- {
- Desktop,
- Mobile,
- Other,
- Xbox
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/NewControlsPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/NewControlsPage.xaml
deleted file mode 100644
index 8572a767ba..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/NewControlsPage.xaml
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/NewControlsPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/NewControlsPage.xaml.cs
deleted file mode 100644
index 522916ed63..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/NewControlsPage.xaml.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Data;
-using System.Linq;
-using Windows.UI;
-using Windows.UI.ViewManagement;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
-
-namespace AppUIBasics
-{
- public sealed partial class NewControlsPage : ItemsPageBase
- {
- public NewControlsPage()
- {
- this.InitializeComponent();
- }
-
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- var menuItem = NavigationRootPage.Current.NavigationView.MenuItems.Cast().ElementAt(1);
- menuItem.IsSelected = true;
- NavigationRootPage.Current.NavigationView.Header = menuItem.Content;
- Items = ControlInfoDataSource.Instance.Groups.SelectMany(g => g.Items.Where(i => i.IsNew)).OrderBy(i => i.Title).ToList();
- }
-
- protected override bool GetIsNarrowLayoutState()
- {
- return LayoutVisualStates.CurrentState == NarrowLayout;
- }
- }
-}
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Package.appxmanifest b/Samples/XamlUIBasics/cs/AppUIBasics/Package.appxmanifest
deleted file mode 100644
index c4131d3037..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/Package.appxmanifest
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
- XAML Controls Gallery
- Microsoft Corporation
- Assets\Tiles\StoreLogo-sdk.png
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- XAML Controls Gallery
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/PageHeader.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/PageHeader.xaml
deleted file mode 100644
index 963c016e56..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/PageHeader.xaml
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/PageHeader.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/PageHeader.xaml.cs
deleted file mode 100644
index 8ea3ee3d42..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/PageHeader.xaml.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Data;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Windows.System;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Input;
-
-namespace AppUIBasics
-{
- public sealed partial class PageHeader : UserControl
- {
- public static readonly DependencyProperty TitleProperty = DependencyProperty.Register("Title", typeof(object), typeof(PageHeader), new PropertyMetadata(null));
- public object Title
- {
- get { return GetValue(TitleProperty); }
- set { SetValue(TitleProperty, value); }
- }
-
- public double BackgroundColorOpacity
- {
- get { return (double)GetValue(BackgroundColorOpacityProperty); }
- set { SetValue(BackgroundColorOpacityProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for BackgroundColorOpacity. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty BackgroundColorOpacityProperty =
- DependencyProperty.Register("BackgroundColorOpacity", typeof(double), typeof(PageHeader), new PropertyMetadata(0.0));
-
-
- public double AcrylicOpacity
- {
- get { return (double)GetValue(AcrylicOpacityProperty); }
- set { SetValue(AcrylicOpacityProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for BackgroundColorOpacity. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty AcrylicOpacityProperty =
- DependencyProperty.Register("AcrylicOpacity", typeof(double), typeof(PageHeader), new PropertyMetadata(0.3));
-
-
- public CommandBar TopCommandBar
- {
- get { return topCommandBar; }
- }
-
- public UIElement TitlePanel
- {
- get { return pageTitle; }
- }
-
- public Action ToggleThemeAction { get; set; }
-
- public PageHeader()
- {
- this.InitializeComponent();
- }
-
- public void UpdateBackground(bool isFilteredPage)
- {
- VisualStateManager.GoToState(this, isFilteredPage ? "FilteredPage" : "NonFilteredPage", false);
- }
-
- private void OnThemeButtonClick(object sender, RoutedEventArgs e)
- {
- ToggleThemeAction?.Invoke();
- }
-
- private void Layout_SizeChanged(object sender, SizeChangedEventArgs e)
- {
- if (e.NewSize.Width < 593)
- {
- headerRoot.VerticalAlignment = VerticalAlignment.Center;
- } else
- {
- headerRoot.VerticalAlignment = VerticalAlignment.Bottom;
- }
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Properties/AssemblyInfo.cs b/Samples/XamlUIBasics/cs/AppUIBasics/Properties/AssemblyInfo.cs
deleted file mode 100644
index 48732ff817..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("AppUIBasics")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("AppUIBasics")]
-[assembly: AssemblyCopyright("Copyright © 2014")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: ComVisible(false)]
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage1.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage1.xaml
deleted file mode 100644
index 852a01bee0..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage1.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage1.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage1.xaml.cs
deleted file mode 100644
index c03d723f1f..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage1.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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.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
-
-namespace AppUIBasics.SamplePages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class SamplePage1 : Page
- {
- public SamplePage1()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage2.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage2.xaml
deleted file mode 100644
index 128647fb70..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage2.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage2.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage2.xaml.cs
deleted file mode 100644
index ce87b0f5d6..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage2.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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.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
-
-namespace AppUIBasics.SamplePages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class SamplePage2 : Page
- {
- public SamplePage2()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage3.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage3.xaml
deleted file mode 100644
index 129a0f8554..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage3.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage3.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage3.xaml.cs
deleted file mode 100644
index d647c2ae65..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SamplePage3.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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.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
-
-namespace AppUIBasics.SamplePages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class SamplePage3 : Page
- {
- public SamplePage3()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SampleSettingsPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SampleSettingsPage.xaml
deleted file mode 100644
index c7f616b1ea..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SampleSettingsPage.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SampleSettingsPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SampleSettingsPage.xaml.cs
deleted file mode 100644
index 5770fdb6aa..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SamplePages/SampleSettingsPage.xaml.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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.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
-
-namespace AppUIBasics.SamplePages
-{
- ///
- /// An empty page that can be used on its own or navigated to within a Frame.
- ///
- public sealed partial class SampleSettingsPage : Page
- {
- public SampleSettingsPage()
- {
- this.InitializeComponent();
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SearchResultsPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SearchResultsPage.xaml
deleted file mode 100644
index b8e76f80bf..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SearchResultsPage.xaml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SearchResultsPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SearchResultsPage.xaml.cs
deleted file mode 100644
index 718e486477..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SearchResultsPage.xaml.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Common;
-using AppUIBasics.Data;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
-
-namespace AppUIBasics
-{
- ///
- /// This page displays search results when a global search is directed to this application.
- ///
- public sealed partial class SearchResultsPage : ItemsPageBase
- {
- private IEnumerable _filters;
- private int? _pivotIndex;
- string _queryText;
-
- public IEnumerable Filters
- {
- get { return _filters; }
- set { this.SetProperty(ref _filters, value); }
- }
-
- public SearchResultsPage()
- {
- this.InitializeComponent();
- }
-
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- base.OnNavigatedTo(e);
-
- var queryText = e.Parameter?.ToString().ToLower();
-
- BuildFilterList(queryText);
-
- NavigationRootPage.Current.NavigationView.Header = "Search";
- }
-
- protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
- {
- base.OnNavigatingFrom(e);
-
- _pivotIndex = resultsPivot.SelectedIndex != -1 ? resultsPivot.SelectedIndex : default(int?);
- }
-
- private void OnResultsPivotLoaded(object sender, RoutedEventArgs e)
- {
- if (NavigationRootPage.Current.DeviceFamily == DeviceType.Xbox)
- {
- resultsPivot.IsHeaderItemsCarouselEnabled = false;
- }
-
- resultsPivot.Focus(FocusState.Programmatic);
- }
-
- private void BuildFilterList(string queryText)
- {
- if (!string.IsNullOrEmpty(queryText))
- {
- // Application-specific searching logic. The search process is responsible for
- // creating a list of user-selectable result categories:
- var filterList = new List();
-
- foreach (var group in ControlInfoDataSource.Instance.Groups)
- {
- var matchingItems =
- group.Items.Where(item =>
- item.Title.ToLower().Contains(queryText) ||
- item.Subtitle.ToLower().Contains(queryText))
- .ToList();
-
- int numberOfMatchingItems = matchingItems.Count();
-
- if (numberOfMatchingItems > 0)
- {
- filterList.Add(new Filter(group.Title, numberOfMatchingItems, matchingItems));
- }
- }
-
- if (filterList.Count == 0)
- {
- // Display informational text when there are no search results.
- VisualStateManager.GoToState(this, "NoResultsFound", false);
- var textbox = NavigationRootPage.Current.PageHeader.GetDescendantsOfType().FirstOrDefault();
- textbox?.Focus(FocusState.Programmatic);
- }
- else
- {
- // When there are search results, set Filters
- var allControls = filterList.SelectMany(s => s.Items).ToList();
- filterList.Insert(0, new Filter("All", allControls.Count, allControls, true));
- Filters = filterList;
-
- // Check to see if the current query matches the last
- if (_queryText == queryText)
- {
- // If so try to restore any previously selected pivot item
- if (_pivotIndex != null)
- {
- resultsPivot.SelectedIndex = _pivotIndex.Value;
- }
- }
- else
- {
- // Otherwise reset query text and pivot index
- _queryText = queryText;
- _pivotIndex = null;
- }
-
- VisualStateManager.GoToState(this, "ResultsFound", false);
- }
- }
- }
-
- protected override bool GetIsNarrowLayoutState()
- {
- return LayoutVisualStates.CurrentState == NarrowLayout;
- }
- }
-
- ///
- /// View model describing one of the filters available for viewing search results.
- ///
- public sealed class Filter : INotifyPropertyChanged
- {
- private String _name;
- private int _count;
- private bool? _active;
- private List _items;
-
- public Filter(String name, int count, List controlInfoList, bool active = false)
- {
- this.Name = name;
- this.Count = count;
- this.Active = active;
- this.Items = controlInfoList;
- }
-
- public override String ToString()
- {
- return Description;
- }
-
- public List Items
- {
- get { return _items; }
- set { this.SetProperty(ref _items, value); }
- }
-
- public String Name
- {
- get { return _name; }
- set { if (this.SetProperty(ref _name, value)) this.NotifyPropertyChanged(nameof(Description)); }
- }
-
- public int Count
- {
- get { return _count; }
- set { if (this.SetProperty(ref _count, value)) this.NotifyPropertyChanged(nameof(Description)); }
- }
-
- public bool? Active
- {
- get { return _active; }
- set { this.SetProperty(ref _active, value); }
- }
-
- public String Description
- {
- get { return String.Format("{0} ({1})", _name, _count); }
- }
-
- ///
- /// Multicast event for property change notifications.
- ///
- public event PropertyChangedEventHandler PropertyChanged;
-
- ///
- /// Checks if a property already matches a desired value. Sets the property and
- /// notifies listeners only when necessary.
- ///
- /// Type of the property.
- /// Reference to a property with both getter and setter.
- /// Desired value for the property.
- /// Name of the property used to notify listeners. This
- /// value is optional and can be provided automatically when invoked from compilers that
- /// support CallerMemberName.
- /// True if the value was changed, false if the existing value matched the
- /// desired value.
- private bool SetProperty(ref T storage, T value, [CallerMemberName] String propertyName = null)
- {
- if (object.Equals(storage, value)) return false;
-
- storage = value;
- this.NotifyPropertyChanged(propertyName);
- return true;
- }
-
- ///
- /// Notifies listeners that a property value has changed.
- ///
- /// Name of the property used to notify listeners. This
- /// value is optional and can be provided automatically when invoked from compilers
- /// that support .
- private void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
- {
- this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-}
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SectionPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SectionPage.xaml
deleted file mode 100644
index 1c57e922df..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SectionPage.xaml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SectionPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SectionPage.xaml.cs
deleted file mode 100644
index 8570a439be..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SectionPage.xaml.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.Data;
-using System.Linq;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Navigation;
-
-namespace AppUIBasics
-{
- ///
- /// A page that displays an overview of a single group, including a preview of the items
- /// within the group.
- ///
- public sealed partial class SectionPage : ItemsPageBase
- {
- public SectionPage()
- {
- this.InitializeComponent();
- }
-
- protected override async void OnNavigatedTo(NavigationEventArgs e)
- {
- base.OnNavigatedTo(e);
-
- var group = await ControlInfoDataSource.Instance.GetGroupAsync((string)e.Parameter);
-
- var menuItem = NavigationRootPage.Current.NavigationView.MenuItems.Cast().Single(i => (string)i.Tag == group.UniqueId);
- menuItem.IsSelected = true;
- NavigationRootPage.Current.NavigationView.Header = menuItem.Content;
-
- Items = group.Items.OrderBy(i => i.Title).ToList();
- }
-
- protected override bool GetIsNarrowLayoutState()
- {
- return LayoutVisualStates.CurrentState == NarrowLayout;
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SettingsPage.xaml b/Samples/XamlUIBasics/cs/AppUIBasics/SettingsPage.xaml
deleted file mode 100644
index c1c9383296..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SettingsPage.xaml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This app is the interactive companion to the
- Fluent Design System web site .
- The source code to this app is available on
-
- https://github.com/Microsoft/Windows-universal-samples/tree/dev/Samples/XamlUIBasics
- .
-
-
- To clone the source repository:
-
-
- git clone https://github.com/Microsoft/Windows-universal-samples -b dev
-
-
- To contact the authors,
- mailto:ControlsGallery@microsoft.com .
-
-
-
-
- THIS CODE AND INFORMATION IS PROVIDED ‘AS IS’ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
-
- Copyright (c) Microsoft Corporation. All rights reserved.
-
-
- Microsoft Services Agreement ,
- Microsoft Privacy Statement
-
-
-
-
-
-
-
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/SettingsPage.xaml.cs b/Samples/XamlUIBasics/cs/AppUIBasics/SettingsPage.xaml.cs
deleted file mode 100644
index fff75398f2..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/SettingsPage.xaml.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-//*********************************************************
-//
-// Copyright (c) Microsoft. All rights reserved.
-// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
-// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
-// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-//
-//*********************************************************
-using AppUIBasics.ControlPages;
-using System;
-using System.Linq;
-using Windows.System;
-using Windows.UI;
-using Windows.UI.ViewManagement;
-using Windows.UI.Xaml;
-using Windows.UI.Xaml.Controls;
-using Windows.UI.Xaml.Input;
-using Windows.UI.Xaml.Navigation;
-
-namespace AppUIBasics
-{
- ///
- /// A page that displays the app's settings.
- ///
- public sealed partial class SettingsPage : Page
- {
- public SettingsPage()
- {
- this.InitializeComponent();
- Loaded += OnSettingsPageLoaded;
-
- if (ElementSoundPlayer.State == ElementSoundPlayerState.On)
- soundToggle.IsOn = true;
- if (ElementSoundPlayer.SpatialAudioMode == ElementSpatialAudioMode.On)
- spatialSoundBox.IsChecked = true;
- }
-
- protected override void OnNavigatedTo(NavigationEventArgs e)
- {
- base.OnNavigatedTo(e);
-
- NavigationRootPage.Current.NavigationView.Header = "Settings";
- }
-
- private async void OnFeedbackButtonClick(object sender, RoutedEventArgs e)
- {
- await Launcher.LaunchUriAsync(new Uri("feedback-hub:"));
- }
-
- private void OnSettingsPageLoaded(object sender, RoutedEventArgs e)
- {
- var currentTheme = App.RootTheme.ToString();
- (ThemePanel.Children.Cast().FirstOrDefault(c => c?.Tag?.ToString() == currentTheme)).IsChecked = true;
- }
-
- private void OnThemeRadioButtonChecked(object sender, RoutedEventArgs e)
- {
- var selectedTheme = ((RadioButton)sender)?.Tag?.ToString();
- ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;
-
- if (selectedTheme != null)
- {
- App.RootTheme = App.GetEnum(selectedTheme);
- if (selectedTheme == "Dark")
- {
- titleBar.ButtonForegroundColor = Colors.White;
- }
- else if (selectedTheme == "Light")
- {
- titleBar.ButtonForegroundColor = Colors.Black;
- } else
- {
- if (Application.Current.RequestedTheme == ApplicationTheme.Dark)
- {
- titleBar.ButtonForegroundColor = Colors.White;
- }
- else
- {
- titleBar.ButtonForegroundColor = Colors.Black;
- }
- }
- }
- }
-
- private void OnThemeRadioButtonKeyDown(object sender, KeyRoutedEventArgs e)
- {
- if (e.Key == VirtualKey.Up)
- {
- NavigationRootPage.Current.PageHeader.Focus(FocusState.Programmatic);
- }
- }
- private void spatialSoundBox_Checked(object sender, RoutedEventArgs e)
- {
- if(soundToggle.IsOn == true)
- {
- ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.On;
- }
- }
-
- private void soundToggle_Toggled(object sender, RoutedEventArgs e)
- {
- if (soundToggle.IsOn == true)
- {
- spatialSoundBox.IsEnabled = true;
- ElementSoundPlayer.State = ElementSoundPlayerState.On;
- }
- else
- {
- spatialSoundBox.IsEnabled = false;
- spatialSoundBox.IsChecked = false;
-
- ElementSoundPlayer.State = ElementSoundPlayerState.Off;
- ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.Off;
- }
- }
-
- private void spatialSoundBox_Unchecked(object sender, RoutedEventArgs e)
- {
- if (soundToggle.IsOn == true)
- {
- ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.Off;
- }
- }
- }
-}
diff --git a/Samples/XamlUIBasics/cs/AppUIBasics/Strings/en-US/Resources.resw b/Samples/XamlUIBasics/cs/AppUIBasics/Strings/en-US/Resources.resw
deleted file mode 100644
index fe6a795b60..0000000000
--- a/Samples/XamlUIBasics/cs/AppUIBasics/Strings/en-US/Resources.resw
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Help
-
-
- Controls by function
-
-
- Controls by name
-
-
- Documentation
-
-
- </body></html>
- Closing tags to add to WebView NavigateToString calls
-
-
- <!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><style>body {font-family: 'Segoe UI';}</style></head><body>
- Opening tags to add to WebView NavigateToString calls
-
-
- AppUIBasics.ControlPages.
- Path to control pages. Used to load frame in ItemsPage.
-
-
- Related controls
-
-
- From any control page, open the help panel from the bottom app bar to see custom help content for that control.
- Default content for the about settings flyout. Shown when data context is null.
-
-
\ No newline at end of file
diff --git a/Samples/XamlUIBasics/xaml-ui-basics.yaml b/Samples/XamlUIBasics/xaml-ui-basics.yaml
deleted file mode 100644
index f1ce06d0f8..0000000000
--- a/Samples/XamlUIBasics/xaml-ui-basics.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-### YamlMime:Sample
-sample:
-- name: XAML Controls Gallery (aka XamlUiBasics)
- description: Shows all of the XAML controls in an interactive format.
- generateZip: true
- extendedZipContent:
- - path: /SharedContent
- target: /SharedContent
- preserveParentHierarchy: true
- author: oldnewthing
- languages:
- - csharp
- technologies:
- - windows
- vssolution: /Samples/XamlUIBasics/cs/AppUIBasics/AppUIBasics.sln