-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Implement loading control with sample. #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 26 commits
bcc05a4
ebd9cce
8836f88
732f0c5
f689df8
002dcff
fa49e92
6148fd1
69697dc
82a7140
75db927
1ebf5d2
601fc9d
84f2bd7
b58aca4
f29401d
e79c07f
5da6ea1
0c6c077
0c2c7d3
4224209
491f2b9
5a94a19
e3c6e22
8dbd4cc
6a88090
dd06da0
7ae1949
a1e170f
ee2c4e8
033716c
1f0a6a4
c45a336
26174a5
dd13fc1
ddedd7d
7585cca
06e9ccb
13aa821
cf09a0b
195a3c1
f78a6a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -248,6 +248,7 @@ | |
| <Content Include="SamplePages\ImageEx\ImageEx.png" /> | ||
| <Content Include="SamplePages\Incremental Loading Collection\icon.png" /> | ||
| <Content Include="SamplePages\LinkedIn Service\LinkedInLogo.png" /> | ||
| <Content Include="SamplePages\Loading\Loading.png" /> | ||
| <Content Include="SamplePages\MasterDetailsView\MasterDetailsView.png" /> | ||
| <Content Include="SamplePages\Microsoft Graph Service\OfficeLogo.png" /> | ||
| <Content Include="SamplePages\Microsoft Graph Service\user.png" /> | ||
|
|
@@ -257,6 +258,7 @@ | |
| <Content Include="SamplePages\RadialGauge\RadialGauge.png" /> | ||
| <Content Include="SamplePages\RangeSelector\RangeSelector.png" /> | ||
| <Content Include="SamplePages\AdaptiveGridView\AdaptiveGridView.png" /> | ||
| <Content Include="SamplePages\ResizeBehavior\ResizeBehaviorCode.txt" /> | ||
| <Content Include="SamplePages\Rotate\RotateBehavior.png" /> | ||
| <Content Include="SamplePages\LiveTile\icon.jpg" /> | ||
| <Content Include="SamplePages\RotatorTile\RotatorTile.png" /> | ||
|
|
@@ -309,6 +311,7 @@ | |
| <Content Include="SamplePages\FadeHeader\FadeHeaderBehaviorCode.bind" /> | ||
| <Content Include="SamplePages\FadeHeader\FadeHeaderBehaviorXaml.bind" /> | ||
| <Content Include="SamplePages\ImageCache\ImageCacheXaml.bind" /> | ||
| <Content Include="SamplePages\Loading\LoadingCode.bind" /> | ||
| <Content Include="SamplePages\LinkedIn Service\LinkedInCode.bind" /> | ||
| <Content Include="SamplePages\Incremental Loading Collection\IncrementalLoadingCollectionCode.bind" /> | ||
| <Content Include="SamplePages\ImageCache\ImageCacheCode.bind" /> | ||
|
|
@@ -317,7 +320,6 @@ | |
| <Content Include="SamplePages\Toast\ToastCodeJavaScript.bind" /> | ||
| <Content Include="SamplePages\Object Storage\ObjectStorageCode.bind" /> | ||
| <Content Include="SamplePages\WeatherLiveTileAndToast\WeatherLiveTileAndToastCodeJavaScript.bind" /> | ||
| <Content Include="SamplePages\Microsoft Graph Service\MicrosoftGraphCode.bind" /> | ||
| <Content Include="SamplePages\BackgroundTaskHelper\BackgroundTaskHelperCode.bind" /> | ||
| <Content Include="SamplePages\MasterDetailsView\MasterDetailsView.bind" /> | ||
| <Content Include="SamplePages\ConnectionHelper\ConnectionHelperCode.bind" /> | ||
|
|
@@ -389,6 +391,12 @@ | |
| <Compile Include="SamplePages\MasterDetailsView\MasterDetailsViewPage.xaml.cs"> | ||
| <DependentUpon>MasterDetailsViewPage.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\Loading\LoadingPage.xaml.cs"> | ||
| <DependentUpon>LoadingPage.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\ImageCache\ImageCachePage.xaml.cs"> | ||
|
||
| <DependentUpon>ImageCachePage.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\Microsoft Graph Service\MicrosoftGraphPage.xaml.cs"> | ||
| <DependentUpon>MicrosoftGraphPage.xaml</DependentUpon> | ||
| </Compile> | ||
|
|
@@ -397,12 +405,12 @@ | |
| <Compile Include="SamplePages\Microsoft Graph Service\SendMessageContentDialog.xaml.cs"> | ||
| <DependentUpon>SendMessageContentDialog.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\ImageCache\ImageCachePage.xaml.cs"> | ||
| <DependentUpon>ImageCachePage.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\PrintHelper\PrintHelperPage.xaml.cs"> | ||
| <DependentUpon>PrintHelperPage.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\ResizeBehavior\ResizeBehaviorPage.xaml.cs"> | ||
| <DependentUpon>ResizeBehaviorPage.xaml</DependentUpon> | ||
| </Compile> | ||
| <Compile Include="SamplePages\RotatorTile\RotatorTilePage.xaml.cs"> | ||
| <DependentUpon>RotatorTilePage.xaml</DependentUpon> | ||
| </Compile> | ||
|
|
@@ -544,6 +552,14 @@ | |
| <SubType>Designer</SubType> | ||
| <Generator>MSBuild:Compile</Generator> | ||
| </Page> | ||
| <Page Include="SamplePages\Loading\LoadingPage.xaml"> | ||
| <SubType>Designer</SubType> | ||
| <Generator>MSBuild:Compile</Generator> | ||
| </Page> | ||
| <Page Include="SamplePages\ImageCache\ImageCachePage.xaml"> | ||
| <Generator>MSBuild:Compile</Generator> | ||
| <SubType>Designer</SubType> | ||
| </Page> | ||
| <Page Include="SamplePages\Microsoft Graph Service\MicrosoftGraphPage.xaml"> | ||
| <Generator>MSBuild:Compile</Generator> | ||
| <SubType>Designer</SubType> | ||
|
|
@@ -552,11 +568,11 @@ | |
| <Generator>MSBuild:Compile</Generator> | ||
| <SubType>Designer</SubType> | ||
| </Page> | ||
| <Page Include="SamplePages\ImageCache\ImageCachePage.xaml"> | ||
| <Page Include="SamplePages\PrintHelper\PrintHelperPage.xaml"> | ||
| <Generator>MSBuild:Compile</Generator> | ||
| <SubType>Designer</SubType> | ||
| </Page> | ||
| <Page Include="SamplePages\PrintHelper\PrintHelperPage.xaml"> | ||
| <Page Include="SamplePages\ResizeBehavior\ResizeBehaviorPage.xaml"> | ||
| <Generator>MSBuild:Compile</Generator> | ||
| <SubType>Designer</SubType> | ||
| </Page> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| using Microsoft.Toolkit.Uwp.SampleApp.Data; | ||
| using Microsoft.Toolkit.Uwp.SampleApp.Models; | ||
| using Windows.UI.Popups; | ||
| using Windows.UI.Xaml.Controls; | ||
| using Windows.UI.Xaml.Navigation; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages | ||
|
|
@@ -42,14 +43,14 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) | |
| AdaptiveGridViewControl.SelectionChanged += AdaptiveGridViewControl_SelectionChanged; | ||
| } | ||
|
|
||
| private void AdaptiveGridViewControl_SelectionChanged(object sender, Windows.UI.Xaml.Controls.SelectionChangedEventArgs e) | ||
| private void AdaptiveGridViewControl_SelectionChanged(object sender, SelectionChangedEventArgs e) | ||
| { | ||
| SelectedItemCountTextBlock.Text = AdaptiveGridViewControl.SelectedItems.Any() | ||
| ? $"You have selected {AdaptiveGridViewControl.SelectedItems.Count} items." | ||
| : "You haven't selected any items"; | ||
| } | ||
|
|
||
| private async void AdaptiveGridViewControl_ItemClick(object sender, Windows.UI.Xaml.Controls.ItemClickEventArgs e) | ||
| private async void AdaptiveGridViewControl_ItemClick(object sender, ItemClickEventArgs e) | ||
|
||
| { | ||
| if (e.ClickedItem != null) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| <Page x:Name="PageName" | ||
| x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.LoadingPage" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <Page.Resources> | ||
| <ResourceDictionary> | ||
| <DataTemplate x:Key="WaitListTemplate"> | ||
| <StackPanel Orientation="Horizontal" Padding="12"> | ||
| <ProgressRing IsActive="True" Margin="0,0,12,0" Foreground="{StaticResource Brush-Blue-01}" /> | ||
| <TextBlock Text="Loading control with wait ring" VerticalAlignment="Center" /> | ||
| </StackPanel> | ||
| </DataTemplate> | ||
| <DataTemplate x:Key="ProgressBarTemplate"> | ||
| <ProgressBar IsIndeterminate="True" Width="{Binding ElementName=PageName, Path=ActualWidth}" | ||
| Foreground="{StaticResource Brush-Grey-04}" /> | ||
| </DataTemplate> | ||
| <DataTemplate x:Key="LogoTemplate"> | ||
| <StackPanel Orientation="Horizontal" Padding="12"> | ||
| <Image Source="../../Assets/ToolkitLogo.png" Height="50" Margin="0,0,12,0" /> | ||
| <TextBlock Text="Loading control with logo" VerticalAlignment="Center" /> | ||
| </StackPanel> | ||
| </DataTemplate> | ||
|
|
||
| <DataTemplate x:Key="PhotosTemplate"> | ||
| <Grid Background="White" BorderBrush="Black" BorderThickness="1"> | ||
| <Image Source="{Binding Thumbnail}" | ||
| Stretch="UniformToFill" | ||
| HorizontalAlignment="Center" | ||
| VerticalAlignment="Center" /> | ||
| </Grid> | ||
| </DataTemplate> | ||
| </ResourceDictionary> | ||
| </Page.Resources> | ||
|
|
||
| <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
|
||
| <ScrollViewer> | ||
| <StackPanel Margin="20"> | ||
| <RichTextBlock Margin="0,10,0,0" Foreground="{StaticResource Brush-Grey-03}"> | ||
| <Paragraph FontSize="18" FontWeight="Bold">The loading control is for showing an animation with some content when the user should wait in some tasks of the app.</Paragraph> | ||
| <Paragraph /> | ||
| <Paragraph>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</Paragraph> | ||
| <Paragraph /> | ||
| <Paragraph>Expetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id.</Paragraph> | ||
| <Paragraph /> | ||
| <Paragraph>His audiam deserunt in, eum ubique voluptatibus te. In reque dicta usu. Ne rebum dissentiet eam, vim omnis deseruisse id. Ullum deleniti vituperata at quo, insolens complectitur te eos, ea pri dico munere propriae. Vel ferri facilis ut, qui paulo ridens praesent ad. Possim alterum qui cu. Accusamus consulatu ius te, cu decore soleat appareat usu.</Paragraph> | ||
| </RichTextBlock> | ||
|
|
||
| <controls:AdaptiveGridView | ||
| Margin="0,12,0,0" | ||
| x:Name="AdaptiveGridViewControl" | ||
| ItemHeight="200" | ||
| DesiredWidth="300" | ||
| SelectionMode="None" | ||
| IsItemClickEnabled="False" | ||
| ItemTemplate="{StaticResource PhotosTemplate}" /> | ||
|
|
||
| </StackPanel> | ||
| </ScrollViewer> | ||
|
|
||
| <controls:Loading x:Name="LoadingControl" LoadingHorizontalAlignment="@[LoadingContentHorizontalAlignment:Enum:HorizontalAlignment.Center:Left.Right.Center.Stretch]" | ||
| LoadingVerticalAlignment="@[LoadingContentVerticalAlignment:Enum:VerticalAlignment.Center:Stretch.Center.Top.Bottom]" | ||
|
||
| LoadingBackground="@[LoadingBackground:Brush:CadetBlue]" LoadingOpacity="@[OpacityForLoadingControl:DoubleSlider:0.75:0-1]"> | ||
| <ContentControl x:Name="LoadingContentControl"/> | ||
| </controls:Loading> | ||
| </Grid> | ||
| </Page> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| <Page x:Name="PageName" | ||
| x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.LoadingPage" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <Page.Resources> | ||
| <ResourceDictionary> | ||
| <DataTemplate x:Key="WaitListTemplate"> | ||
| <StackPanel Orientation="Horizontal" Padding="12"> | ||
| <ProgressRing IsActive="True" Margin="0,0,12,0" Foreground="{StaticResource Brush-Blue-01}" /> | ||
| <TextBlock Text="Loading control with wait ring" VerticalAlignment="Center" /> | ||
| </StackPanel> | ||
| </DataTemplate> | ||
| <DataTemplate x:Key="ProgressBarTemplate"> | ||
| <ProgressBar IsIndeterminate="True" Width="{Binding ElementName=PageName, Path=ActualWidth}" | ||
| Foreground="{StaticResource Brush-Grey-04}" /> | ||
| </DataTemplate> | ||
| <DataTemplate x:Key="LogoTemplate"> | ||
| <StackPanel Orientation="Horizontal" Padding="12"> | ||
| <Image Source="../../Assets/ToolkitLogo.png" Height="50" Margin="0,0,12,0" /> | ||
| <TextBlock Text="Loading control with logo" VerticalAlignment="Center" /> | ||
| </StackPanel> | ||
| </DataTemplate> | ||
|
|
||
| <DataTemplate x:Key="PhotosTemplate"> | ||
| <Grid Background="White" BorderBrush="Black" BorderThickness="1"> | ||
| <Image Source="{Binding Thumbnail}" | ||
| Stretch="UniformToFill" | ||
| HorizontalAlignment="Center" | ||
| VerticalAlignment="Center" /> | ||
| </Grid> | ||
| </DataTemplate> | ||
| </ResourceDictionary> | ||
| </Page.Resources> | ||
|
|
||
| <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
|
||
| <ScrollViewer> | ||
| <StackPanel Margin="20"> | ||
| <RichTextBlock Margin="0,10,0,0" Foreground="{StaticResource Brush-Grey-03}"> | ||
| <Paragraph FontSize="18" FontWeight="Bold">The loading control is for showing an animation with some content when the user should wait in some tasks of the app.</Paragraph> | ||
| <Paragraph /> | ||
| <Paragraph>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</Paragraph> | ||
| <Paragraph /> | ||
| <Paragraph>Expetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant aeterno interesset at. Usu ea mundi tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo. Usu nullam dolorum quaestio ei, sit vidit facilisis ea. Per ne impedit iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id.</Paragraph> | ||
| <Paragraph /> | ||
| <Paragraph>His audiam deserunt in, eum ubique voluptatibus te. In reque dicta usu. Ne rebum dissentiet eam, vim omnis deseruisse id. Ullum deleniti vituperata at quo, insolens complectitur te eos, ea pri dico munere propriae. Vel ferri facilis ut, qui paulo ridens praesent ad. Possim alterum qui cu. Accusamus consulatu ius te, cu decore soleat appareat usu.</Paragraph> | ||
| </RichTextBlock> | ||
|
|
||
| <controls:AdaptiveGridView | ||
| Margin="0,12,0,0" | ||
| x:Name="AdaptiveGridViewControl" | ||
| ItemHeight="200" | ||
| DesiredWidth="300" | ||
| SelectionMode="None" | ||
| IsItemClickEnabled="False" | ||
| ItemTemplate="{StaticResource PhotosTemplate}" /> | ||
|
|
||
| </StackPanel> | ||
| </ScrollViewer> | ||
|
|
||
| <controls:Loading x:Name="LoadingControl" | ||
| LoadingHorizontalAlignment="{Binding LoadingContentHorizontalAlignment.Value}" | ||
| LoadingVerticalAlignment="{Binding LoadingContentVerticalAlignment.Value}" | ||
| LoadingBackground="{Binding LoadingBackground.Value}" | ||
| LoadingOpacity="{Binding OpacityForLoadingControl.Value}"> | ||
| <ContentControl x:Name="LoadingContentControl" /> | ||
| </controls:Loading> | ||
| </Grid> | ||
| </Page> | ||
|
|
||
|
|
||
|
|

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be removed