Xamarin.Forms ScrollView ScrollToAsync() results in blank content on iOSBuild unsuccessful : Error with Android project in Xamarin.FormsXamarin Forms ListView CachingStrategyVisual studio compilation error, Xamarin.formsVS for Mac - can't run XF.iOS on Simulator or registered DeviceInvalid Cast Exception with FreshEssentials BindablePickerTabbedPageWithNavigation in Xamarin.Forms fails with many tabsXamarin.Forms release error bundles/armeabi-v7a/temp.c:1:39: fatal error: mono/metadata/mono-config.h: No such file or directoryString.Copy not available in Xamarin PCL project?Xamarin.Forms Previewer - An android application project must reference a project containing this xaml file in order to render in the previewerXamarin.Forms - 'Cannot convert Large to type System.Double' when using OnIdiom and named font size
Social leper versus social leopard
Why does NASA publish all the results/data it gets?
Is the mass of paint relevant in rocket design?
Would Taiwan and China's dispute be solved if Taiwan gave up being the Republic of China?
Late 1970's and 6502 chip facilities for operating systems
Are Custom Indexes passed on to Sandboxes
Is it impolite to ask for halal food when traveling to and in Thailand?
Is it more effective to add yeast before or after kneading?
Hiking with a mule or two?
Does wetting a beer glass change the foam characteristics?
How do pilots align the HUD with their eyeballs?
What do you do if you have developments on your paper during the long peer review process?
Does Sitecore have support for Sitecore products in containers?
A simple game that keeps track of the number of questions asked
What is the meaning of "heutig" in this sentence?
Do we have any particular tonal center in mind when we are NOT listening music?
1, 2, 4, 8, 16, ... 33?
On the meaning of 'anyways' in "What Exactly Is a Quartz Crystal, Anyways?"
Can a broken/split chain be reassembled?
I reverse the source code, you negate the input!
How to deal with my team leader who keeps calling me about project updates even though I am on leave for personal reasons?
How do I set a custom order for folders on Windows 7 and 10?
What is the need of methods like GET and POST in the HTTP protocol?
What can a pilot do if an air traffic controller is incapacitated?
Xamarin.Forms ScrollView ScrollToAsync() results in blank content on iOS
Build unsuccessful : Error with Android project in Xamarin.FormsXamarin Forms ListView CachingStrategyVisual studio compilation error, Xamarin.formsVS for Mac - can't run XF.iOS on Simulator or registered DeviceInvalid Cast Exception with FreshEssentials BindablePickerTabbedPageWithNavigation in Xamarin.Forms fails with many tabsXamarin.Forms release error bundles/armeabi-v7a/temp.c:1:39: fatal error: mono/metadata/mono-config.h: No such file or directoryString.Copy not available in Xamarin PCL project?Xamarin.Forms Previewer - An android application project must reference a project containing this xaml file in order to render in the previewerXamarin.Forms - 'Cannot convert Large to type System.Double' when using OnIdiom and named font size
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Background
We have a page where we have a bound RepeaterView within a ScrollView. We're adding Questions to the bound collection as the user answers questions (the aim is to give a series of questions, scrolling off the top as the user progresses).
We want the ScrollView to scroll to the bottom as we add Questions.
To do this, I've created an Event which we raise when we add a Question, and added a handler in the Page. I'm subscribing/unsubscribing on the Appearing/Disappearing events for the page to avoid memory leaks etc.
The Problem
On Android this works fine. But on iOS, the ScrollView goes blank. However, if I background the app and bring it back to the foreground (by tapping the Home button and then the app icon, the screen then refreshes.
Therefore it appears that the Page isn't being refreshed properly by my code.
My XAML code:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MvvmCross.Forms.Presenters.Attributes;
using MyApp.Mobile.PageModels.Claims.Medical;
using MyApp.Mobile.Pages.Base;
using Xamarin.Forms;
namespace MyApp.Mobile.Pages.Claims.Medical
[MvxContentPagePresentation(NoHistory = true)]
public partial class ClaimConditionPage : BaseContentPage<ClaimConditionPageModel>
public ClaimConditionPage()
InitializeComponent();
protected override void OnAppearing()
if (BindingContext != null)
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded += Model_QuestionAdded;
base.OnAppearing();
protected override void OnDisappearing()
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded -= Model_QuestionAdded;
base.OnDisappearing();
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await QuestionScrollView.ScrollToAsync(0, QuestionScrollView.Content.Height, false);
);
I've seen suggestions of adding a Task.Delay() to allow the UI to catch up - but this didn't work.
Note that this is only on iOS.
I note that there is this bug, but I don't think this is my problem. The ScrollView does scroll, but the display goes blank.
Versions
Xamarin.Forms 3.4.0.1029999
=== Visual Studio Community 2017 for Mac ===
Version 7.8.2 (build 1)
Installation UUID: 650b4c91-c7f5-4ee5-ad70-6f178f314906
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.0.0.0 ( / b40230c0)
Package version: 516000221
=== Mono Framework MDK ===
Runtime:
Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit)
Package version: 516000221
=== NuGet ===
Version: 4.8.0.5385
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.8
2.1.5
2.1.2
2.1.1
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.504/Sdks
SDK Versions:
2.1.504
2.1.403
2.1.302
2.1.301
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.1 (14460.46)
Build 10B61
=== Xamarin.Mac ===
Version: 5.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch:
Build date: 2019-02-01 12:23:30-0500
=== Xamarin.iOS ===
Version: 12.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch: d15-9
Build date: 2019-02-01 12:23:29-0500
=== Xamarin.Android ===
Version: 9.1.8.0 (Visual Studio Community)
Android SDK: /Users/jameslavery/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.0
SDK Build Tools Version: 26.0.2
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/jameslavery/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 7.8.1.0
Hash: 8924ea4a
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 708020001
Git revision: 13e0e5b7e85ffe742957e6f204bab5c06c644f0e
Build date: 2019-02-27 19:33:14+00
Build branch: release-7.8
Xamarin extensions: 23eaa7c9cdc9a3f55be7bb87b485a790ec82ef25
=== Operating System ===
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Fri Nov 2 20:43:16 PDT 2018
root:xnu-4570.71.17~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
LiveXAML 1.3.31
MFractor 3.7.10
MvvmCross Template pack 2.0.1
NuGet Package Management Extensions 0.15
Template Creator 0.4
Redth's Addins 1.0.9
Internet of Things (IoT) development (Preview) 7.5
xamarin.forms
add a comment
|
Background
We have a page where we have a bound RepeaterView within a ScrollView. We're adding Questions to the bound collection as the user answers questions (the aim is to give a series of questions, scrolling off the top as the user progresses).
We want the ScrollView to scroll to the bottom as we add Questions.
To do this, I've created an Event which we raise when we add a Question, and added a handler in the Page. I'm subscribing/unsubscribing on the Appearing/Disappearing events for the page to avoid memory leaks etc.
The Problem
On Android this works fine. But on iOS, the ScrollView goes blank. However, if I background the app and bring it back to the foreground (by tapping the Home button and then the app icon, the screen then refreshes.
Therefore it appears that the Page isn't being refreshed properly by my code.
My XAML code:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MvvmCross.Forms.Presenters.Attributes;
using MyApp.Mobile.PageModels.Claims.Medical;
using MyApp.Mobile.Pages.Base;
using Xamarin.Forms;
namespace MyApp.Mobile.Pages.Claims.Medical
[MvxContentPagePresentation(NoHistory = true)]
public partial class ClaimConditionPage : BaseContentPage<ClaimConditionPageModel>
public ClaimConditionPage()
InitializeComponent();
protected override void OnAppearing()
if (BindingContext != null)
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded += Model_QuestionAdded;
base.OnAppearing();
protected override void OnDisappearing()
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded -= Model_QuestionAdded;
base.OnDisappearing();
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await QuestionScrollView.ScrollToAsync(0, QuestionScrollView.Content.Height, false);
);
I've seen suggestions of adding a Task.Delay() to allow the UI to catch up - but this didn't work.
Note that this is only on iOS.
I note that there is this bug, but I don't think this is my problem. The ScrollView does scroll, but the display goes blank.
Versions
Xamarin.Forms 3.4.0.1029999
=== Visual Studio Community 2017 for Mac ===
Version 7.8.2 (build 1)
Installation UUID: 650b4c91-c7f5-4ee5-ad70-6f178f314906
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.0.0.0 ( / b40230c0)
Package version: 516000221
=== Mono Framework MDK ===
Runtime:
Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit)
Package version: 516000221
=== NuGet ===
Version: 4.8.0.5385
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.8
2.1.5
2.1.2
2.1.1
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.504/Sdks
SDK Versions:
2.1.504
2.1.403
2.1.302
2.1.301
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.1 (14460.46)
Build 10B61
=== Xamarin.Mac ===
Version: 5.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch:
Build date: 2019-02-01 12:23:30-0500
=== Xamarin.iOS ===
Version: 12.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch: d15-9
Build date: 2019-02-01 12:23:29-0500
=== Xamarin.Android ===
Version: 9.1.8.0 (Visual Studio Community)
Android SDK: /Users/jameslavery/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.0
SDK Build Tools Version: 26.0.2
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/jameslavery/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 7.8.1.0
Hash: 8924ea4a
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 708020001
Git revision: 13e0e5b7e85ffe742957e6f204bab5c06c644f0e
Build date: 2019-02-27 19:33:14+00
Build branch: release-7.8
Xamarin extensions: 23eaa7c9cdc9a3f55be7bb87b485a790ec82ef25
=== Operating System ===
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Fri Nov 2 20:43:16 PDT 2018
root:xnu-4570.71.17~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
LiveXAML 1.3.31
MFractor 3.7.10
MvvmCross Template pack 2.0.1
NuGet Package Management Extensions 0.15
Template Creator 0.4
Redth's Addins 1.0.9
Internet of Things (IoT) development (Preview) 7.5
xamarin.forms
add a comment
|
Background
We have a page where we have a bound RepeaterView within a ScrollView. We're adding Questions to the bound collection as the user answers questions (the aim is to give a series of questions, scrolling off the top as the user progresses).
We want the ScrollView to scroll to the bottom as we add Questions.
To do this, I've created an Event which we raise when we add a Question, and added a handler in the Page. I'm subscribing/unsubscribing on the Appearing/Disappearing events for the page to avoid memory leaks etc.
The Problem
On Android this works fine. But on iOS, the ScrollView goes blank. However, if I background the app and bring it back to the foreground (by tapping the Home button and then the app icon, the screen then refreshes.
Therefore it appears that the Page isn't being refreshed properly by my code.
My XAML code:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MvvmCross.Forms.Presenters.Attributes;
using MyApp.Mobile.PageModels.Claims.Medical;
using MyApp.Mobile.Pages.Base;
using Xamarin.Forms;
namespace MyApp.Mobile.Pages.Claims.Medical
[MvxContentPagePresentation(NoHistory = true)]
public partial class ClaimConditionPage : BaseContentPage<ClaimConditionPageModel>
public ClaimConditionPage()
InitializeComponent();
protected override void OnAppearing()
if (BindingContext != null)
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded += Model_QuestionAdded;
base.OnAppearing();
protected override void OnDisappearing()
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded -= Model_QuestionAdded;
base.OnDisappearing();
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await QuestionScrollView.ScrollToAsync(0, QuestionScrollView.Content.Height, false);
);
I've seen suggestions of adding a Task.Delay() to allow the UI to catch up - but this didn't work.
Note that this is only on iOS.
I note that there is this bug, but I don't think this is my problem. The ScrollView does scroll, but the display goes blank.
Versions
Xamarin.Forms 3.4.0.1029999
=== Visual Studio Community 2017 for Mac ===
Version 7.8.2 (build 1)
Installation UUID: 650b4c91-c7f5-4ee5-ad70-6f178f314906
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.0.0.0 ( / b40230c0)
Package version: 516000221
=== Mono Framework MDK ===
Runtime:
Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit)
Package version: 516000221
=== NuGet ===
Version: 4.8.0.5385
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.8
2.1.5
2.1.2
2.1.1
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.504/Sdks
SDK Versions:
2.1.504
2.1.403
2.1.302
2.1.301
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.1 (14460.46)
Build 10B61
=== Xamarin.Mac ===
Version: 5.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch:
Build date: 2019-02-01 12:23:30-0500
=== Xamarin.iOS ===
Version: 12.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch: d15-9
Build date: 2019-02-01 12:23:29-0500
=== Xamarin.Android ===
Version: 9.1.8.0 (Visual Studio Community)
Android SDK: /Users/jameslavery/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.0
SDK Build Tools Version: 26.0.2
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/jameslavery/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 7.8.1.0
Hash: 8924ea4a
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 708020001
Git revision: 13e0e5b7e85ffe742957e6f204bab5c06c644f0e
Build date: 2019-02-27 19:33:14+00
Build branch: release-7.8
Xamarin extensions: 23eaa7c9cdc9a3f55be7bb87b485a790ec82ef25
=== Operating System ===
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Fri Nov 2 20:43:16 PDT 2018
root:xnu-4570.71.17~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
LiveXAML 1.3.31
MFractor 3.7.10
MvvmCross Template pack 2.0.1
NuGet Package Management Extensions 0.15
Template Creator 0.4
Redth's Addins 1.0.9
Internet of Things (IoT) development (Preview) 7.5
xamarin.forms
Background
We have a page where we have a bound RepeaterView within a ScrollView. We're adding Questions to the bound collection as the user answers questions (the aim is to give a series of questions, scrolling off the top as the user progresses).
We want the ScrollView to scroll to the bottom as we add Questions.
To do this, I've created an Event which we raise when we add a Question, and added a handler in the Page. I'm subscribing/unsubscribing on the Appearing/Disappearing events for the page to avoid memory leaks etc.
The Problem
On Android this works fine. But on iOS, the ScrollView goes blank. However, if I background the app and bring it back to the foreground (by tapping the Home button and then the app icon, the screen then refreshes.
Therefore it appears that the Page isn't being refreshed properly by my code.
My XAML code:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MvvmCross.Forms.Presenters.Attributes;
using MyApp.Mobile.PageModels.Claims.Medical;
using MyApp.Mobile.Pages.Base;
using Xamarin.Forms;
namespace MyApp.Mobile.Pages.Claims.Medical
[MvxContentPagePresentation(NoHistory = true)]
public partial class ClaimConditionPage : BaseContentPage<ClaimConditionPageModel>
public ClaimConditionPage()
InitializeComponent();
protected override void OnAppearing()
if (BindingContext != null)
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded += Model_QuestionAdded;
base.OnAppearing();
protected override void OnDisappearing()
ClaimConditionPageModel model = (ClaimConditionPageModel)this.BindingContext.DataContext;
model.QuestionAdded -= Model_QuestionAdded;
base.OnDisappearing();
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await QuestionScrollView.ScrollToAsync(0, QuestionScrollView.Content.Height, false);
);
I've seen suggestions of adding a Task.Delay() to allow the UI to catch up - but this didn't work.
Note that this is only on iOS.
I note that there is this bug, but I don't think this is my problem. The ScrollView does scroll, but the display goes blank.
Versions
Xamarin.Forms 3.4.0.1029999
=== Visual Studio Community 2017 for Mac ===
Version 7.8.2 (build 1)
Installation UUID: 650b4c91-c7f5-4ee5-ad70-6f178f314906
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.0.0.0 ( / b40230c0)
Package version: 516000221
=== Mono Framework MDK ===
Runtime:
Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit)
Package version: 516000221
=== NuGet ===
Version: 4.8.0.5385
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.8
2.1.5
2.1.2
2.1.1
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.504/Sdks
SDK Versions:
2.1.504
2.1.403
2.1.302
2.1.301
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Updater ===
Version: 11
=== Apple Developer Tools ===
Xcode 10.1 (14460.46)
Build 10B61
=== Xamarin.Mac ===
Version: 5.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch:
Build date: 2019-02-01 12:23:30-0500
=== Xamarin.iOS ===
Version: 12.2.1.15 (Visual Studio Community)
Hash: d60abd198
Branch: d15-9
Build date: 2019-02-01 12:23:29-0500
=== Xamarin.Android ===
Version: 9.1.8.0 (Visual Studio Community)
Android SDK: /Users/jameslavery/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.0
SDK Build Tools Version: 26.0.2
=== Microsoft Mobile OpenJDK ===
Java SDK: /Users/jameslavery/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Android Device Manager ===
Version: 7.8.1.0
Hash: 8924ea4a
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 708020001
Git revision: 13e0e5b7e85ffe742957e6f204bab5c06c644f0e
Build date: 2019-02-27 19:33:14+00
Build branch: release-7.8
Xamarin extensions: 23eaa7c9cdc9a3f55be7bb87b485a790ec82ef25
=== Operating System ===
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Fri Nov 2 20:43:16 PDT 2018
root:xnu-4570.71.17~1/RELEASE_X86_64 x86_64
=== Enabled user installed extensions ===
LiveXAML 1.3.31
MFractor 3.7.10
MvvmCross Template pack 2.0.1
NuGet Package Management Extensions 0.15
Template Creator 0.4
Redth's Addins 1.0.9
Internet of Things (IoT) development (Preview) 7.5
xamarin.forms
xamarin.forms
asked Mar 28 at 16:30
James LaveryJames Lavery
4582 silver badges14 bronze badges
4582 silver badges14 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
It appears that there is a bug on iOS with this ScrollToAsync
signature.
Changing to the ScrollToAsync
which takes an Element fixes it.
Interestingly, I need aTask.Delay(10)
to allow the Repeater's size to update before the ScrollToAsync is called. The resulting code is:
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await Task.Delay(10);
await QuestionScrollView.ScrollToAsync(QuestionRepeater, ScrollToPosition.End, true);
);
It would be good to avoid the Task.Delay()
if possible - I don't like this sort of thing because timings differ on devices, and I'm likely to find the delay isn't long enough on slower/faster devices.
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55402646%2fxamarin-forms-scrollview-scrolltoasync-results-in-blank-content-on-ios%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It appears that there is a bug on iOS with this ScrollToAsync
signature.
Changing to the ScrollToAsync
which takes an Element fixes it.
Interestingly, I need aTask.Delay(10)
to allow the Repeater's size to update before the ScrollToAsync is called. The resulting code is:
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await Task.Delay(10);
await QuestionScrollView.ScrollToAsync(QuestionRepeater, ScrollToPosition.End, true);
);
It would be good to avoid the Task.Delay()
if possible - I don't like this sort of thing because timings differ on devices, and I'm likely to find the delay isn't long enough on slower/faster devices.
add a comment
|
It appears that there is a bug on iOS with this ScrollToAsync
signature.
Changing to the ScrollToAsync
which takes an Element fixes it.
Interestingly, I need aTask.Delay(10)
to allow the Repeater's size to update before the ScrollToAsync is called. The resulting code is:
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await Task.Delay(10);
await QuestionScrollView.ScrollToAsync(QuestionRepeater, ScrollToPosition.End, true);
);
It would be good to avoid the Task.Delay()
if possible - I don't like this sort of thing because timings differ on devices, and I'm likely to find the delay isn't long enough on slower/faster devices.
add a comment
|
It appears that there is a bug on iOS with this ScrollToAsync
signature.
Changing to the ScrollToAsync
which takes an Element fixes it.
Interestingly, I need aTask.Delay(10)
to allow the Repeater's size to update before the ScrollToAsync is called. The resulting code is:
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await Task.Delay(10);
await QuestionScrollView.ScrollToAsync(QuestionRepeater, ScrollToPosition.End, true);
);
It would be good to avoid the Task.Delay()
if possible - I don't like this sort of thing because timings differ on devices, and I'm likely to find the delay isn't long enough on slower/faster devices.
It appears that there is a bug on iOS with this ScrollToAsync
signature.
Changing to the ScrollToAsync
which takes an Element fixes it.
Interestingly, I need aTask.Delay(10)
to allow the Repeater's size to update before the ScrollToAsync is called. The resulting code is:
void Model_QuestionAdded(object sender, EventArgs e)
Device.BeginInvokeOnMainThread(async () =>
await Task.Delay(10);
await QuestionScrollView.ScrollToAsync(QuestionRepeater, ScrollToPosition.End, true);
);
It would be good to avoid the Task.Delay()
if possible - I don't like this sort of thing because timings differ on devices, and I'm likely to find the delay isn't long enough on slower/faster devices.
answered Mar 28 at 17:56
James LaveryJames Lavery
4582 silver badges14 bronze badges
4582 silver badges14 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55402646%2fxamarin-forms-scrollview-scrolltoasync-results-in-blank-content-on-ios%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown