Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bcc05a4
Add loading control on UI.Controls
soydachi Aug 25, 2016
ebd9cce
Add loading control son samples.json and refactor code adapting style
soydachi Aug 25, 2016
8836f88
Implement sample of loading control
soydachi Aug 26, 2016
732f0c5
Add loading image, implement properties for loading control customizatin
soydachi Aug 26, 2016
f689df8
Merged feature/LoadingControl into dev
soydachi Aug 26, 2016
002dcff
fetch upstream dev branch to forked repository
soydachi Aug 26, 2016
fa49e92
Apply nameof and removing this. Adding Loading.xaml template
soydachi Aug 26, 2016
6148fd1
Refactor loading control and add a default template
soydachi Aug 29, 2016
69697dc
Merged feature/LoadingControlImprovements into dev
soydachi Aug 29, 2016
82a7140
Merged branch dev into dev
soydachi Aug 29, 2016
75db927
Remove designer in SampleApp.csproj
soydachi Aug 29, 2016
1ebf5d2
Improve loading sample in SampleApp project.
soydachi Aug 30, 2016
601fc9d
Merged branch dev into dev
soydachi Aug 30, 2016
84f2bd7
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Aug 31, 2016
b58aca4
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Sep 11, 2016
f29401d
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Oct 20, 2016
e79c07f
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Nov 1, 2016
5da6ea1
include upstream/dev files
soydachi Nov 1, 2016
0c6c077
update headers with .\build.ps1
soydachi Nov 1, 2016
0c2c7d3
add handler for loadingRequired and fixing namesapces who throw error
soydachi Nov 1, 2016
4224209
avoid errors in ResizeBehaviorPage.g.i.cs
soydachi Nov 1, 2016
491f2b9
adding first delegate for loadingrequired
soydachi Nov 4, 2016
5a94a19
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Nov 4, 2016
e3c6e22
add loading documentation
soydachi Nov 4, 2016
8dbd4cc
add loading gif and updated Loading.md
soydachi Nov 4, 2016
6a88090
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Nov 4, 2016
dd06da0
add comments and fix PropertyDescriptor namespace
soydachi Nov 4, 2016
7ae1949
Refactor loading control with @skendrot suggestions
soydachi Nov 11, 2016
a1e170f
fixing SampleApp.csproj include contents
soydachi Nov 11, 2016
ee2c4e8
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Nov 11, 2016
033716c
Updating LoadingCode.bind
soydachi Nov 12, 2016
1f0a6a4
updated loading docs
soydachi Dec 6, 2016
c45a336
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Dec 6, 2016
26174a5
LoadingCode.bin to content
soydachi Dec 6, 2016
dd13fc1
update names and undo AdaptiveGridViewPage usings.
soydachi Dec 6, 2016
ddedd7d
removed LoadingRequired event
soydachi Dec 6, 2016
7585cca
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Dec 7, 2016
06e9ccb
Merge remote-tracking branch 'refs/remotes/upstream/dev'
soydachi Jan 22, 2017
13aa821
remove unnecesary code
soydachi Jan 22, 2017
cf09a0b
Update ResizeBehaviorPage.xaml.cs
soydachi Jan 25, 2017
195a3c1
fix little typos and bind BorderBrush and BorderThickness
soydachi Jan 25, 2017
f78a6a6
Merged branch dev into dev
soydachi Jan 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand All @@ -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" />
Expand Down Expand Up @@ -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" />
Expand All @@ -317,7 +320,6 @@
<Content Include="SamplePages\Toast\ToastCodeJavaScript.bind" />
Copy link
Contributor

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

<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" />
Expand Down Expand Up @@ -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">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Make sure changes only include your changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this occurs when ImageCachePage was previously merged and now another merge is trying it again. I just pick mine with both.

<DependentUpon>ImageCachePage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\Microsoft Graph Service\MicrosoftGraphPage.xaml.cs">
<DependentUpon>MicrosoftGraphPage.xaml</DependentUpon>
</Compile>
Expand All @@ -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>
Expand Down Expand Up @@ -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>
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the changes to this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this is throwing errors :S

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an error but some plugin you have. You can tell the namespace isn't an issue b/c said plugin added the using statement (just my guess)

{
if (e.ClickedItem != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Windows.Storage.Pickers;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
Expand Down Expand Up @@ -207,7 +208,7 @@ private void HidePhotoPanel()
PhotoScroller.Visibility = Visibility.Collapsed;
}

private async void PhotoGridView_SelectionChanged(object sender, Windows.UI.Xaml.Controls.SelectionChangedEventArgs e)
private async void PhotoGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Shell.Current.DisplayWaitRing = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Microsoft.Toolkit.Uwp.SampleApp.Data;
using Microsoft.Toolkit.Uwp.UI;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Navigation;

namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
Expand Down Expand Up @@ -64,22 +65,22 @@ private async Task LoadDataAsync()
_photoItems = await new PhotosDataSource().GetItemsAsync(true);
}

private async void PreCache_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
private async void PreCache_Tapped(object sender, TappedRoutedEventArgs e)
{
await PreCacheImages(false);
}

private async void PreCacheInMemory_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
private async void PreCacheInMemory_Tapped(object sender, TappedRoutedEventArgs e)
{
await PreCacheImages(true);
}

private void LoadImages_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
private void LoadImages_Tapped(object sender, TappedRoutedEventArgs e)
{
PhotoList.ItemsSource = _photoItems;
}

private async void ClearCache_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
private async void ClearCache_Tapped(object sender, TappedRoutedEventArgs e)
{
DisableButtons();

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe LoadingVerticalAlignment and the like should be changed to the "base" properties.
Example:
LoadingVerticalAlignment -- VerticalContentAlignment

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>



Loading