xamarin.forms

Xamarin forms SQLite relation

拜拜、爱过 提交于 2020-06-29 06:51:16
问题 I have really been searching around for a while now but cannot find and understand how this do work. I am going to create an app in Xamarin forms and starting with SQLite. I need to have unique list items for each Main item in the app. For example, I am having a list with items. When I am selecting an item in the list a new page will pop up and display the items of that item. So from my point of view I am in need of two SQLite tables with relations between. This is the Main table with all

Set Xamarin WebView Cookie to seamlessly authenticate user without re-entering credentials

半腔热情 提交于 2020-06-29 06:05:42
问题 I have a Xamarin forms mobile app where the user authenticates using a post REST API and I am going to save the returned ASP.NET session ID and the authentication cookie to later pass it to my WebView in the main page to load a web page that needs authentication. For this, I created a custom web view renderer and followed some guides that suggested how to pass the cookie in the cookie container to the WebView for each request. But that does not work and I get to the login page of our website.

Xamarin forms: ImageLoaderSourceHandler: Could not retrieve image or image data was invalid:

半城伤御伤魂 提交于 2020-06-29 04:28:38
问题 Getting below error message when trying to show an image on UI. Exception details: [0:] ImageLoaderSourceHandler: Could not retrieve image or image data was invalid: Uri: "imageurl" [0:] Image Loading: Error getting stream for "imageurl": System.ObjectDisposedException: Can not access a closed Stream. at System.IO.StreamHelpers.ValidateCopyToArgs (System.IO.Stream source, System.IO.Stream destination, System.Int32 bufferSize) [0x0003a] in <46c2fa109b574c7ea6739f9fe2350976>:0 at System.IO

Xamarin form: Can Add tabs in Shell App programmatically on the contentpage

房东的猫 提交于 2020-06-29 04:19:17
问题 I finding through the google but could not find the result. I have a Shell setup Xamarin form application. Eventhough I am not fully use it's functionally but there is a tab setup in xaml file. I am wonder can i have a content page hosted under the shellContent and add Tabs from the contentPage. 回答1: Do you want to achieve it like this GIF? You can add x:Name for TabBar in AppShell.xml like this code. <TabBar x:Name="myTabBars"> <Tab Title="Browse" Icon="tab_feed.png"> <ShellContent

Xamarin.Forms Page.DisplayAlert in Page.OnAppearing

余生长醉 提交于 2020-06-29 04:12:11
问题 I am unable to get a DisplayAlert popup to show within the OnAppearing callback of a Xamarin.Forms Page . Here is what I have tried so far: protected override void OnAppearing() { base.OnAppearing(); this.DisplayAlert("Alert", "Consider yourself alerted", "OK"); } Considering DisplayAlert is technically an async function, returning a Task , I have also tried the following: protected async override void OnAppearing() { base.OnAppearing(); await this.DisplayAlert("Alert", "Consider yourself

VS Xamarin.Forms (Android): Camera and Storage access denied with Xam.Plugin.Media

对着背影说爱祢 提交于 2020-06-29 03:43:07
问题 I have an Xamarin.Forms app, which I test for Android 10 (on device) at the moment. I want to have two buttons: pick photo (from storage) and take photo (from camera). I had some problems with not having the permissions to access the storage and the camera, so I followed this tutorial: https://www.youtube.com/watch?v=IVvJX4CoLUY&t=0s&list=PLv-NAmQyi2iOu7zfbPDhLTXgBwUwVIBga&index=1 . This tutorial is everything I need, since these two buttons are discussed here. I'm using Xam.Plugin.Media for

Masonry list style in Xamarin

僤鯓⒐⒋嵵緔 提交于 2020-06-28 09:54:13
问题 I need to list the announcements on a content page just like masonry style (https://halcyon-theme.tumblr.com/) but I couldn't be successful on it. My problem is that the Scrollview doesn't cover whole the page when I use the Parent Stacklayout's Vertical alignment option set as FillAndExpand. But if I set the Scrollview and Parent StackLayout as static height value, It's okay but due to per item's height will change, I can't use it that's the way as you guess. <StackLayout x:Name="stckParent"

Xamaring.Forms Android 8.0 - Visual Studio 2019

时光总嘲笑我的痴心妄想 提交于 2020-06-28 05:25:56
问题 I'm becoming crazy. I want to compile Xamarin.Forms for Android 8.0 with Visual Studio 2019 I setup all correct, I think, but I always get: Error The $(TargetFrameworkVersion) for App_test32.Android (v8.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (8.1). You need to increase the $(TargetFrameworkVersion) for App_test32.Android. App_test32.Android 回答1: You cannot target 8.0 and that's for a reason. Starting from August 1, 2019 Google doesn't accept new apps

OidcClient2 - Closing IBrowser while waiting for LoginAsync

混江龙づ霸主 提交于 2020-06-27 15:55:07
问题 Currently I am developing a Xamarin App which is using IdentityModel.OidcClient to authenticate against my server, and it is being done using the automatic mode presented on the documentation (https://github.com/IdentityModel/IdentityModel.OidcClient2). Everything is working just fine as var result = await client.LoginAsync(); is returning the LoginResult with the AccessToken, etc. What I am trying to figure out is how the backbutton, the recent apps button (both on android) and the close

How to Copy Cookie to WKWebview in iOS?

百般思念 提交于 2020-06-27 06:16:32
问题 I don't know how/which cookies are coming from which website. Because of that, I can't set manually the cookie names. How can I get third party cookies to paste to a WKWebview ? Here is my code but no chance. My webview; public class CustomWebView : WebView { public static readonly BindableProperty UriProperty = BindableProperty.Create( propertyName: "Uri", returnType: typeof(Uri), declaringType: typeof(CustomWebView), defaultValue: default(string)); public string Uri { get { return (string