I'm going to say it one last time then shut up.
Looking at your screen shot is it very very clear that you are not practicing MVVM, good design, or separation of UI from logic.
This is the crux of the problem you now face. You did bad things in the early stages of your app, are doing bad things now as seen in this screenshot, and now you need a way to patch/band-aid your way out of it. That's why you are trying to get the index from a UI element when you aren't supposed to do that.
I urge you to either:
1 - Take the time now to fix you architecture. 20 hours fixing it now will save you 2,000 hours of headache, problem, patching etc.
2 - If you don't know what's wrong with what you have here... If you think I'm wrong... If you or your team don't have the knowledge/skills to make this right - Then hire someone. Contract someone who is MVVM competent to fix your architecture. There are plenty of people that do like I do and stub out the skeletons of apps for other teams. Once your team has a good design in place, I assume they can do the grunt coding for the various features and modules. You just need a software architect to fix your design.
Once your design is resolved, you won't have this problem to try to band-aid. Do you see where I'm going here? Cure the illness so you don't have to focus on the symptoms.
I had the same build issue in my Azure DevOps pipeline after updating to Xamarin Forms 4.8. My solution was to use a newer mono version (6.10.0 instead of 6.8.0) when building. If you are not running a CI build but instead have this problem locally in VS you can check the current mono version from the "About Visual Studio" screen. If it is lower than 6.10.0 make sure to check for updates in VS.
i made a mistake, as i have copied the code. the ListView.Behaviors must be change to Entry.Behaviors
I just ran into this issue out of no where with my Android app 3 days ago. In the end it was a server issue.
First, I came across this comment
https://github.com/Jackett/Jackett/issues/2491#issuecomment-361035789
Which recommended rebooting the server. I did this and for a bit the error has stopped occurring.
Unfortunately, that was a temporary solution and the error started occurring again. This led me to use GoDaddy's cert checker tool https://ssltools.godaddy.com/views/certChecker . After putting in my server url and tapping Scan My Site... and scrolling to the bottom, it would randomly return Certificate chain is in correct order. OR Certificate chain is incomplete, missing intermediate(s).
Eventually I found this was occurring because my Azure deployment has 2 instances running, and only 1 of the instances (The second) has the issue. I reached out to Microsoft for assistance, and they went in and found that automatic OS update of the server caused it to suddenly not return the intermediate certificates. (but only for 1 instance... bizarre )
They also suggested a different setting which had no impact but... led me to read this documentation.
https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-configure-ssl-certificate-portal#step-2-modify-the-service-definition-and-configuration-files
Containing:
IMPORTANT! Unless your certificate is either
self-signed or signed directly by the CA root, you
must include all the intermediate certificates
here. You must list them here, even if they are
not bound to any endpoints. Failing to list any of
the intermediate certificates may cause hard-to-reproduce
interoperability problems on some clients.
I then decided to add the 2 intermediate GoDaddy certs to my config, redeploy and that fixed my issue.
So in the end it was not an issue with Xamarin or mono, but an issue with the server not properly returning the intermediate certificates.
Hope that helps someone
Hi @qweer ,
We can set Height for ViewCell Dynamically or fixed like below
DynamicHeight
<ListView HasUnevenRows = "true"> </ListView>
Fixed height
<ListView RowHeight = "100"> </ListView>
Here is exactly what is happening to me...
https://github.com/wix/react-native-navigation/issues/428#issuecomment-260427414
Basically, I have a MasterDetail page and the Detail page is a listview. When tapping on an item, PushAsync a new page with no Navigation bar, but I have InteractivePopGestureRecognizer enabled so the user can just swipe "back" in the navigation. Most of the time it works, but the gif you see in the above link happens and I do not know why.
I have NavigationPage.SetHasNavigationBar(this, false);
on the page itself...
and its renderer...
[assembly: ExportRenderer(typeof(ChannelPage), typeof(ChannelPageCustomRenderer))] namespace MyApp.iOS { public class ChannelPageCustomRenderer : PageRenderer, IUIGestureRecognizerDelegate { public ChannelPageCustomRenderer() {} public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); ViewController.NavigationController.InteractivePopGestureRecognizer.Enabled = true; ViewController.NavigationController.InteractivePopGestureRecognizer.Delegate = new UIGestureRecognizerDelegate(); } } }
Direct link to gif: http://i.imgur.com/F3zBwH3.gifv
You have to use a DynamicResource for global styles.
@wellhat said:
Managed to solve this today.I had to uninstall and reinstall Visual Studio, then once again step by step follow this guide https://docs.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=macos
there is an easy way to fix this. you should go to Xcode and open an empty project with the same bundle id as your xamarin.ios project and under settings below, set whatever you want. if you want to debug on simulator. just choose iOS developer and it will appear in your xamarin iOS project as well.
Did you create a Distribution certificate and provisioning profile making sure to use the Push Notification Service entitlement?
Did you set your Entitlements.plist to use aps-environment value of "production"? There was a bug (fixed) that kept resetting that value to "development". See:
https://bugzilla.xamarin.com/show_bug.cgi?id=56956
Try opening your Entitlements.plist file and select the "Source" tab and make sure you see this:
<key>aps-environment</key> <string>production</string>
instead of:
<key>aps-environment</key> <string>development</string>
PS, this was also kind of an issue in XCode:
https://stackoverflow.com/questions/42292363/aps-environment-is-always-development
Without sending arguments:
// Subscribe MessagingCenter.Subscribe<object>(this, "Arrived", (sender) => { // Do something whenever the "Arrived" message is sent from whatever type <object> is. }); // Send MessagingCenter.Send<object>(this, "Arrived"); // Unsubscribe MessagingCenter.Unsubscribe<object>(this, "Arrived");
With sending arguments:
// Subscribe MessagingCenter.Subscribe<object, string>(this, "Arrived", (sender, arg) => { // Do something whenever the "Arrived" message is sent from whatever type <object> is. myEntry.Text = arg; }); // Send MessagingCenter.Send<object, string>(this, "Arrived", "New String"); // Unsubscribe MessagingCenter.Unsubscribe<object, string>(this, "Arrived"); // Source: gist.github.com/Driv4r/b82dec31f8e10495d6f2de62ab85ee4e
The alternative way is to create a class that has nothing to do with either class that's sending or subscribing to the message. It could be as simple as a marker class or a class that has no properties or functions:
// Subscribe MessagingCenter.Subscribe<LoginMessage>(this, "successful_login", (lm) => HandleLogin(lm)); // Send MessagingCenter.Send<LoginMessage>(new LoginMessage, "successful_login"); // Source: codemilltech.com/messing-with-xamarin-forms-messaging-center/
p.s. Cannot post links at the moment, that is why via comments.