From 5b05aaf6f3e66aceef58f15b81064dcf727b888b Mon Sep 17 00:00:00 2001 From: jasonCodesAway Date: Sat, 1 Oct 2016 15:07:12 -0400 Subject: [PATCH] > Update all nugets > DemoImageWallView, use a StackLayout instead of Absolute...way easier! > DemoRatingsView Add a iOS only back button > App.xaml, set the base root navigation page to be the MainView so "Pop" always gets you back to that page > WallView, explicitly call Height and WidthRequest so that StackLayout and other layout managers can know the view's preferred size. Also, OnSizeAllocated gets called multiple times, make sure that 'UpdateViewModels' is only called once and only when the width & height change (i.e. initially and on resize) --- .../Resources/Resource.Designer.cs | 23 +++++++++++++------ .../XamJam.Demo.Droid.csproj | 16 ++++++------- XamJam.Demo/XamJam.Demo.Droid/packages.config | 8 +++---- .../XamJam.Demo.iOS/XamJam.Demo.iOS.csproj | 16 ++++++------- XamJam.Demo/XamJam.Demo.iOS/packages.config | 8 +++---- XamJam.Demo/XamJam.Demo/App.xaml.cs | 4 ++-- .../XamJam.Demo/GettingStarted.Xamarin | 4 ---- .../XamJam.Demo/View/DemoImageWallView.xaml | 10 ++++---- .../XamJam.Demo/View/DemoRatingsView.xaml | 6 ++++- .../ViewModel/DemoImageWallItemViewModel.cs | 5 ++++ .../ViewModel/DemoRatingsViewModel.cs | 9 ++++++++ XamJam.Demo/XamJam.Demo/XamJam.Demo.csproj | 11 ++++----- XamJam.Demo/XamJam.Demo/packages.config | 6 ++--- XamJam.Nav/XamJam.Nav.csproj | 4 ++-- XamJam.Nav/packages.config | 4 ++-- XamJam.Pic/XamJam.Pic.csproj | 4 ++-- XamJam.Pic/packages.config | 2 +- XamJam.PicSelector/XamJam.PicSelector.csproj | 6 ++--- XamJam.PicSelector/packages.config | 4 ++-- .../XamJam.Ratings/XamJam.Ratings.csproj | 4 ++-- XamJam.Ratings/XamJam.Ratings/packages.config | 4 ++-- XamJam.Wall/WallView.xaml.cs | 20 ++++++++++++---- 22 files changed, 105 insertions(+), 73 deletions(-) delete mode 100644 XamJam.Demo/XamJam.Demo/GettingStarted.Xamarin diff --git a/XamJam.Demo/XamJam.Demo.Droid/Resources/Resource.Designer.cs b/XamJam.Demo/XamJam.Demo.Droid/Resources/Resource.Designer.cs index a553313..5010fa8 100644 --- a/XamJam.Demo/XamJam.Demo.Droid/Resources/Resource.Designer.cs +++ b/XamJam.Demo/XamJam.Demo.Droid/Resources/Resource.Designer.cs @@ -29,13 +29,15 @@ public static void UpdateIdValues() global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::XamJam.Demo.Droid.Resource.Attribute.actionBarSize; global::XamSvg.Resource.Attribute.colorMapping = global::XamJam.Demo.Droid.Resource.Attribute.colorMapping; global::XamSvg.Resource.Attribute.colorMappingSelected = global::XamJam.Demo.Droid.Resource.Attribute.colorMappingSelected; + global::XamSvg.Resource.Attribute.loadAsync = global::XamJam.Demo.Droid.Resource.Attribute.loadAsync; global::XamSvg.Resource.Attribute.svg = global::XamJam.Demo.Droid.Resource.Attribute.svg; - global::XamSvg.Resource.Attribute.useCache = global::XamJam.Demo.Droid.Resource.Attribute.useCache; + global::XamSvg.Resource.Attribute.traceEnabled = global::XamJam.Demo.Droid.Resource.Attribute.traceEnabled; global::XamSvg.Resource.Styleable.SvgImageView = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView; global::XamSvg.Resource.Styleable.SvgImageView_colorMapping = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView_colorMapping; global::XamSvg.Resource.Styleable.SvgImageView_colorMappingSelected = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView_colorMappingSelected; + global::XamSvg.Resource.Styleable.SvgImageView_loadAsync = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView_loadAsync; global::XamSvg.Resource.Styleable.SvgImageView_svg = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView_svg; - global::XamSvg.Resource.Styleable.SvgImageView_useCache = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView_useCache; + global::XamSvg.Resource.Styleable.SvgImageView_traceEnabled = global::XamJam.Demo.Droid.Resource.Styleable.SvgImageView_traceEnabled; } public partial class Animation @@ -645,6 +647,9 @@ public partial class Attribute // aapt resource value: 0x7f010093 public const int listPreferredItemPaddingRight = 2130772115; + // aapt resource value: 0x7f010140 + public const int loadAsync = 2130772288; + // aapt resource value: 0x7f010030 public const int logo = 2130772016; @@ -1020,12 +1025,12 @@ public partial class Attribute // aapt resource value: 0x7f010084 public const int toolbarStyle = 2130772100; + // aapt resource value: 0x7f01013f + public const int traceEnabled = 2130772287; + // aapt resource value: 0x7f0100dc public const int track = 2130772188; - // aapt resource value: 0x7f01013f - public const int useCache = 2130772287; - // aapt resource value: 0x7f010118 public const int useCompatPadding = 2130772248; @@ -5589,7 +5594,8 @@ public partial class Styleable 2130772284, 2130772285, 2130772286, - 2130772287}; + 2130772287, + 2130772288}; // aapt resource value: 1 public const int SvgImageView_colorMapping = 1; @@ -5597,11 +5603,14 @@ public partial class Styleable // aapt resource value: 2 public const int SvgImageView_colorMappingSelected = 2; + // aapt resource value: 4 + public const int SvgImageView_loadAsync = 4; + // aapt resource value: 0 public const int SvgImageView_svg = 0; // aapt resource value: 3 - public const int SvgImageView_useCache = 3; + public const int SvgImageView_traceEnabled = 3; public static int[] SwitchCompat = new int[] { 16843044, diff --git a/XamJam.Demo/XamJam.Demo.Droid/XamJam.Demo.Droid.csproj b/XamJam.Demo/XamJam.Demo.Droid/XamJam.Demo.Droid.csproj index b5301dc..41a5324 100644 --- a/XamJam.Demo/XamJam.Demo.Droid/XamJam.Demo.Droid.csproj +++ b/XamJam.Demo/XamJam.Demo.Droid/XamJam.Demo.Droid.csproj @@ -49,19 +49,19 @@ - ..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\MonoAndroid10\FFImageLoading.dll + ..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\MonoAndroid10\FFImageLoading.dll True - ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\MonoAndroid10\FFImageLoading.Forms.dll + ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\MonoAndroid10\FFImageLoading.Forms.dll True - ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll + ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll True - ..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\MonoAndroid10\FFImageLoading.Platform.dll + ..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\MonoAndroid10\FFImageLoading.Platform.dll True @@ -136,19 +136,19 @@ True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.Droid.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.Droid.dll True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.Shared.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.Shared.dll True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.XamForms.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.XamForms.dll True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\MonoAndroid44\XamSvg.XamForms.Droid.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\MonoAndroid44\XamSvg.XamForms.Droid.dll True diff --git a/XamJam.Demo/XamJam.Demo.Droid/packages.config b/XamJam.Demo/XamJam.Demo.Droid/packages.config index fc5f381..d33765d 100644 --- a/XamJam.Demo/XamJam.Demo.Droid/packages.config +++ b/XamJam.Demo/XamJam.Demo.Droid/packages.config @@ -3,8 +3,8 @@ - - + + @@ -13,7 +13,7 @@ - - + + \ No newline at end of file diff --git a/XamJam.Demo/XamJam.Demo.iOS/XamJam.Demo.iOS.csproj b/XamJam.Demo/XamJam.Demo.iOS/XamJam.Demo.iOS.csproj index 3b8dff8..ee5d759 100644 --- a/XamJam.Demo/XamJam.Demo.iOS/XamJam.Demo.iOS.csproj +++ b/XamJam.Demo/XamJam.Demo.iOS/XamJam.Demo.iOS.csproj @@ -117,19 +117,19 @@ - ..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\Xamarin.iOS10\FFImageLoading.dll + ..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\Xamarin.iOS10\FFImageLoading.dll True - ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\Xamarin.iOS10\FFImageLoading.Forms.dll + ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\Xamarin.iOS10\FFImageLoading.Forms.dll True - ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll + ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll True - ..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\Xamarin.iOS10\FFImageLoading.Platform.dll + ..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\Xamarin.iOS10\FFImageLoading.Platform.dll True @@ -169,19 +169,19 @@ - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.Ios.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.Ios.dll True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.Shared.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.Shared.dll True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.XamForms.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.XamForms.dll True - ..\..\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\Xamarin.iOS\XamSvg.XamForms.iOS.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\Xamarin.iOS\XamSvg.XamForms.iOS.dll True diff --git a/XamJam.Demo/XamJam.Demo.iOS/packages.config b/XamJam.Demo/XamJam.Demo.iOS/packages.config index ddb3525..10234b5 100644 --- a/XamJam.Demo/XamJam.Demo.iOS/packages.config +++ b/XamJam.Demo/XamJam.Demo.iOS/packages.config @@ -3,10 +3,10 @@ - - + + - - + + \ No newline at end of file diff --git a/XamJam.Demo/XamJam.Demo/App.xaml.cs b/XamJam.Demo/XamJam.Demo/App.xaml.cs index 00ace95..c32761b 100644 --- a/XamJam.Demo/XamJam.Demo/App.xaml.cs +++ b/XamJam.Demo/XamJam.Demo/App.xaml.cs @@ -41,9 +41,9 @@ private static IDestination[] CreateDestinations(Navigator navigator var navScheme = new NavigationScheme(RootScheme.Singleton); return new IDestination[] { - new RootDestination(RootScheme.Singleton, new MainViewModel(navigator), new MainView()), + new NavigationDestination(navScheme, new MainViewModel(navigator), new MainView()), new NavigationDestination(navScheme, new DemoImageWallViewModel(navigator), new DemoImageWallView(navigator)), - new NavigationDestination(navScheme, new DemoRatingsViewModel(), new DemoRatingsView()), + new NavigationDestination(navScheme, new DemoRatingsViewModel(navigator), new DemoRatingsView()), new NavigationDestination(navScheme, new DemoImageSingleViewModel(navigator), new DemoImageSingleView()) }; } diff --git a/XamJam.Demo/XamJam.Demo/GettingStarted.Xamarin b/XamJam.Demo/XamJam.Demo/GettingStarted.Xamarin deleted file mode 100644 index f31b009..0000000 --- a/XamJam.Demo/XamJam.Demo/GettingStarted.Xamarin +++ /dev/null @@ -1,4 +0,0 @@ - - GS\XF\CS\App\GettingStarted.html - false - \ No newline at end of file diff --git a/XamJam.Demo/XamJam.Demo/View/DemoImageWallView.xaml b/XamJam.Demo/XamJam.Demo/View/DemoImageWallView.xaml index ebe2180..3d99c4d 100644 --- a/XamJam.Demo/XamJam.Demo/View/DemoImageWallView.xaml +++ b/XamJam.Demo/XamJam.Demo/View/DemoImageWallView.xaml @@ -3,12 +3,12 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:wall="clr-namespace:XamJam.Wall;assembly=XamJam.Wall" x:Class="XamJam.Demo.View.DemoImageWallView"> - - - - + + \ No newline at end of file diff --git a/XamJam.Demo/XamJam.Demo/View/DemoRatingsView.xaml b/XamJam.Demo/XamJam.Demo/View/DemoRatingsView.xaml index 088f020..783a734 100644 --- a/XamJam.Demo/XamJam.Demo/View/DemoRatingsView.xaml +++ b/XamJam.Demo/XamJam.Demo/View/DemoRatingsView.xaml @@ -6,6 +6,10 @@ \ No newline at end of file diff --git a/XamJam.Demo/XamJam.Demo/ViewModel/DemoImageWallItemViewModel.cs b/XamJam.Demo/XamJam.Demo/ViewModel/DemoImageWallItemViewModel.cs index 2e737d3..111bd6b 100644 --- a/XamJam.Demo/XamJam.Demo/ViewModel/DemoImageWallItemViewModel.cs +++ b/XamJam.Demo/XamJam.Demo/ViewModel/DemoImageWallItemViewModel.cs @@ -30,5 +30,10 @@ await navigator.ShowAsync(vm => }); }); } + + public override string ToString() + { + return ImageText; + } } } diff --git a/XamJam.Demo/XamJam.Demo/ViewModel/DemoRatingsViewModel.cs b/XamJam.Demo/XamJam.Demo/ViewModel/DemoRatingsViewModel.cs index 26c2392..4ef9541 100644 --- a/XamJam.Demo/XamJam.Demo/ViewModel/DemoRatingsViewModel.cs +++ b/XamJam.Demo/XamJam.Demo/ViewModel/DemoRatingsViewModel.cs @@ -3,6 +3,8 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using Xamarin.Forms; +using XamJam.Nav; using XamJam.Ratings; namespace XamJam.Demo.ViewModel @@ -10,5 +12,12 @@ namespace XamJam.Demo.ViewModel public class DemoRatingsViewModel { public RatingViewModel RatingViewModel { get; } = new RatingViewModel(); + + public Command BackCommand { get; } + + public DemoRatingsViewModel(Navigator nav) + { + BackCommand = nav.BackAsyncCommand; + } } } diff --git a/XamJam.Demo/XamJam.Demo/XamJam.Demo.csproj b/XamJam.Demo/XamJam.Demo/XamJam.Demo.csproj index 2473f8e..4d07a23 100644 --- a/XamJam.Demo/XamJam.Demo/XamJam.Demo.csproj +++ b/XamJam.Demo/XamJam.Demo/XamJam.Demo.csproj @@ -67,20 +67,19 @@ - - ..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll + ..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll True - ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll + ..\..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll True - ..\..\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll + ..\..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll True @@ -104,11 +103,11 @@ True - $(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll True - $(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll True diff --git a/XamJam.Demo/XamJam.Demo/packages.config b/XamJam.Demo/XamJam.Demo/packages.config index fa66de3..7356bfb 100644 --- a/XamJam.Demo/XamJam.Demo/packages.config +++ b/XamJam.Demo/XamJam.Demo/packages.config @@ -3,8 +3,8 @@ - - - + + + \ No newline at end of file diff --git a/XamJam.Nav/XamJam.Nav.csproj b/XamJam.Nav/XamJam.Nav.csproj index b15f26a..ff6dd10 100644 --- a/XamJam.Nav/XamJam.Nav.csproj +++ b/XamJam.Nav/XamJam.Nav.csproj @@ -82,11 +82,11 @@ True - $(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll + ..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll True - $(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll + ..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll True diff --git a/XamJam.Nav/packages.config b/XamJam.Nav/packages.config index a5aef92..7b94f5d 100644 --- a/XamJam.Nav/packages.config +++ b/XamJam.Nav/packages.config @@ -3,8 +3,8 @@ - - + + \ No newline at end of file diff --git a/XamJam.Pic/XamJam.Pic.csproj b/XamJam.Pic/XamJam.Pic.csproj index 744046c..e7aa776 100644 --- a/XamJam.Pic/XamJam.Pic.csproj +++ b/XamJam.Pic/XamJam.Pic.csproj @@ -42,11 +42,11 @@ - ..\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll + ..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll True - ..\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll + ..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll True diff --git a/XamJam.Pic/packages.config b/XamJam.Pic/packages.config index 36c392f..1671418 100644 --- a/XamJam.Pic/packages.config +++ b/XamJam.Pic/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/XamJam.PicSelector/XamJam.PicSelector.csproj b/XamJam.PicSelector/XamJam.PicSelector.csproj index b4204ab..4eac7a1 100644 --- a/XamJam.PicSelector/XamJam.PicSelector.csproj +++ b/XamJam.PicSelector/XamJam.PicSelector.csproj @@ -49,15 +49,15 @@ - $(SolutionDir)\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll + ..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.dll True - $(SolutionDir)\packages\Xamarin.FFImageLoading.Forms.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll + ..\packages\Xamarin.FFImageLoading.Forms.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Forms.dll True - $(SolutionDir)\packages\Xamarin.FFImageLoading.2.1.7\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll + ..\packages\Xamarin.FFImageLoading.2.1.8\lib\portable-net45+win8+wpa81+wp8\FFImageLoading.Platform.dll True diff --git a/XamJam.PicSelector/packages.config b/XamJam.PicSelector/packages.config index 493ab58..f42ae79 100644 --- a/XamJam.PicSelector/packages.config +++ b/XamJam.PicSelector/packages.config @@ -5,7 +5,7 @@ - - + + \ No newline at end of file diff --git a/XamJam.Ratings/XamJam.Ratings/XamJam.Ratings.csproj b/XamJam.Ratings/XamJam.Ratings/XamJam.Ratings.csproj index cc1e1d1..e1edaec 100644 --- a/XamJam.Ratings/XamJam.Ratings/XamJam.Ratings.csproj +++ b/XamJam.Ratings/XamJam.Ratings/XamJam.Ratings.csproj @@ -70,11 +70,11 @@ True - $(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.Shared.dll True - $(SolutionDir)\packages\Vapolia.XamSvg.Forms.2.3.0.8\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll + ..\..\packages\Vapolia.XamSvg.Forms.2.3.2.2\lib\portable-win8+net45+wp8+wpa81+MonoAndroid44+Xamarin.iOS10\XamSvg.XamForms.dll True diff --git a/XamJam.Ratings/XamJam.Ratings/packages.config b/XamJam.Ratings/XamJam.Ratings/packages.config index a5aef92..7b94f5d 100644 --- a/XamJam.Ratings/XamJam.Ratings/packages.config +++ b/XamJam.Ratings/XamJam.Ratings/packages.config @@ -3,8 +3,8 @@ - - + + \ No newline at end of file diff --git a/XamJam.Wall/WallView.xaml.cs b/XamJam.Wall/WallView.xaml.cs index 0f6848c..c5450da 100644 --- a/XamJam.Wall/WallView.xaml.cs +++ b/XamJam.Wall/WallView.xaml.cs @@ -49,7 +49,7 @@ public Func ViewCreator public int MaxCacheSize { - get { return (int) GetValue(MaxCacheSizeProperty); } + get { return (int)GetValue(MaxCacheSizeProperty); } set { SetValue(MaxCacheSizeProperty, value); } } @@ -71,7 +71,7 @@ protected override void OnBindingContextChanged() { hasInitialized = true; CreateViews(); - viewModels = new CacheWindow(new WallImageProvider(ViewModelCreator), initialCacheSize:numVisibleViews, maxCacheSize: MaxCacheSize); + viewModels = new CacheWindow(new WallImageProvider(ViewModelCreator), initialCacheSize: numVisibleViews, maxCacheSize: MaxCacheSize); } } @@ -80,8 +80,10 @@ protected override void OnSizeAllocated(double width, double height) base.OnSizeAllocated(width, height); if (width > 0 && height > 0) { - SetupViewSizesAndVisibility(width, height); - UpdateViewModels(ViewModelCommand.Initialize); + if (SetupViewSizesAndVisibility(width, height)) + { + UpdateViewModels(ViewModelCommand.Initialize); + } } } @@ -114,6 +116,8 @@ private void CreateViews() AbsoluteLayout.Children.Add(view); } numVisibleViews = maxNumViews; + WidthRequest = size.Width; + HeightRequest = size.Height; } @@ -121,7 +125,7 @@ private void CreateViews() /// Setups up all views EXCEPT DOES NOT setup the view models / BindingContexts /// private double lastWidth, lastHeight; - private void SetupViewSizesAndVisibility(double screenWidth, double screenHeight) + private bool SetupViewSizesAndVisibility(double screenWidth, double screenHeight) { var sizeChanged = screenWidth != lastWidth || screenHeight != lastHeight; if (sizeChanged) @@ -166,8 +170,11 @@ private void SetupViewSizesAndVisibility(double screenWidth, double screenHeight lastWidth = screenWidth; lastHeight = screenHeight; + WidthRequest = screenWidth; + HeightRequest = screenHeight; Monitor.Info($"Size Allocated: {screenWidth}x{screenHeight}, Grid = {newSize.NumRows}x{newSize.NumColumns}, Paddings = {newSize.PaddingX}x{newSize.PaddingY}, ItemSize = {newSize.ItemSize.Width}x{newSize.ItemSize.Height}"); } + return sizeChanged; } public enum ViewModelCommand @@ -179,6 +186,7 @@ public enum ViewModelCommand private void UpdateViewModels(ViewModelCommand command) { + Monitor.Debug($"Updating ViewModels due to {command}"); RetrievedData viewModelsToDisplay; switch (command) { @@ -205,12 +213,14 @@ private void UpdateViewModels(ViewModelCommand command) { // Yay, this View has data available, may the View and ViewModel be married! wallView.BindingContext = viewModelsToDisplay.Retrieved[i++]; + Monitor.Debug($"Displaying ViewModel: {wallView.BindingContext}"); wallView.IsVisible = true; // This is necessary because the view may have become invisible if there was no view model for it (think page forward to end, then page back) } else { // Sorry View, there is no ViewModel available for you. You are banished and hidden. wallView.IsVisible = false; + Monitor.Debug($"Hiding View that was Displaying ViewModel: {wallView.BindingContext}"); //numVisibleViews--; } }