xamarin.forms

How to create xamarin PCL Project in Visual Studio 2019

大城市里の小女人 提交于 2021-02-08 09:16:19
问题 I am not having option for PCL Project while Creating new xamarin project in VS 2019. I am getting option as shown in image I run old PCL Project, It is running successfully. Please help me to create PCL Project in VS 2019. 回答1: Portable Class Libraries (PCLs) are deprecated in the latest versions of Visual Studio. you can still open, edit, and compile PCLs For new projects it is recommended to use .NET Standard libraries to access a larger API surface area. For more details please refer

Xamarin.Forms: Not appearing OxyPlot Pie Chart

邮差的信 提交于 2021-02-08 08:21:19
问题 Good Day everyone. I'm creating a Xamarin.Forms Portable Application and I want to display there a Chart using a OxyPlot. I followed a documentation in here about OxyPlot. But I still kinda confuse. Can you please look at the process I followed and check if what I did was right? These are just based on my own understanding. Here's what I did : Update the Xamarin.Forms NuGet packages to the latest version. Add the OxyPlot.Xamarin.Forms NuGet package in both the portable and platform specific

Azure Mobile Services LoginAsync method not working with Microsoft Auth Token

偶尔善良 提交于 2021-02-08 07:57:25
问题 I have successfully been able to get an access_token (or authenticationToken for Microsoft tokens) using the client side authentication in my Xamarin forms App. I am able to get further user information (email, name, etc.) using the same access token. Now, when I try to pass that token to my Azure Mobile Service backend, I get a 401 error. Here is my code: private async System.Threading.Tasks.Task<string> MSGetUserInfo(Account account) { // Reference: http://graph.microsoft.io/en-us/docs

Azure Mobile Services LoginAsync method not working with Microsoft Auth Token

余生长醉 提交于 2021-02-08 07:57:21
问题 I have successfully been able to get an access_token (or authenticationToken for Microsoft tokens) using the client side authentication in my Xamarin forms App. I am able to get further user information (email, name, etc.) using the same access token. Now, when I try to pass that token to my Azure Mobile Service backend, I get a 401 error. Here is my code: private async System.Threading.Tasks.Task<string> MSGetUserInfo(Account account) { // Reference: http://graph.microsoft.io/en-us/docs

List is changed when I update another list with same data type

我的梦境 提交于 2021-02-08 07:46:34
问题 My code looks like this. public class Category { public string CatId { get; set; } public string CatName { get; set; } public string SpecId { get; set; } public string SpecName { get; set; } } List<Category> LstCategory = new List<Category>(); List<Category> LstCatWithSpec = new List<Category>(); Now, I want to add category first in LstCatWithSpec . I copy this list in LstCategory and then add specialties in LstCatWithSpec . Now, when I update list with specialties, the list in which I copied

List is changed when I update another list with same data type

廉价感情. 提交于 2021-02-08 07:46:32
问题 My code looks like this. public class Category { public string CatId { get; set; } public string CatName { get; set; } public string SpecId { get; set; } public string SpecName { get; set; } } List<Category> LstCategory = new List<Category>(); List<Category> LstCatWithSpec = new List<Category>(); Now, I want to add category first in LstCatWithSpec . I copy this list in LstCategory and then add specialties in LstCatWithSpec . Now, when I update list with specialties, the list in which I copied

Using async/await to return the result of a Xamarin.Forms dependency service callback?

我与影子孤独终老i 提交于 2021-02-08 06:38:34
问题 I have a Xamarin Forms project and implemented a dependency service to send an SMS but I can't figure out how to convert the device independent callbacks into an async await so that I can return it. For example, with my iOS implementation I have something like: [assembly: Xamarin.Forms.Dependency(typeof(MySms))] namespace MyProject.iOS.DS { class MySms : IMySms { // ... public void SendSms(string to = null, string message = null) { if (MFMessageComposeViewController.CanSendText) {

Is there a way that I can include FormattedText in a .alert with Xamarin.Forms?

妖精的绣舞 提交于 2021-02-08 06:24:19
问题 I have a formatted string. In the code it's more than this but this is just an example: var fs = new FormattedString(); fs = fs.Spans.Add(new Span { Text = "ABC, ForegroundColor = Color.FromHex("555555") }); Is there a way that I can use formatted text in an alert? var answer = await DisplayAlert ("Test", alertText, "Yes", "No"); 回答1: I think the answer is "no". I suggest to create your own "popupAlert" using some packages like Rg.Plugins.Popup // Use these methods in PopupNavigation globally

Xamarin forms open view model on notification tap

若如初见. 提交于 2021-02-08 05:38:15
问题 I am using this code to show notification in notification bar. When the notification is tapped, main activity is launched. Is it possible to launch the view model instead of activity in Xamarin forms app with MvvmCross. Intent notificationIntent = new Intent(context,typeof(MainActivity)); notificationIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pIntent = PendingIntent.getActivity(context, code, notificationIntent, PendingIntent.FLAG_UPDATE

Stripe API on Xamarin.Forms [closed]

若如初见. 提交于 2021-02-08 04:59:25
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Improve this question Has anyone here tried integrating the Stripe API on Xamarin.Forms? I've been looking through the internet and I can't find any resources about it. I just started training on Xamarin and I don't know much. It would be very nice if someone could me with this