xamarin.forms

Adding a Project Reference to a Xamarin Forms App

跟風遠走 提交于 2021-01-29 11:26:07
问题 VS 2017 / C#. I have a working Web and WebApi app. A web page accessing the WebApi (both written by me). I am now trying to create a Mobile App using Xamarin forms to call the WebApi. My mobile app needs access to a DTO project (part of my API). I can add the reference to the xxx.Android App, but I need to reference the DTO's in the xxx.Mobile App. There seems to be no option to add a reference in that 'shared' app. This means my code error's as it cannot find the DTO definitions. Anyone have

xamarin.forms Update Listview with picker

南笙酒味 提交于 2021-01-29 11:25:08
问题 I have xamarin forms app which have a picker at the top and a listview just beneath it.When the app launches the data on picker will bind from a web API.Then after according to the picker value another API call will be done and the listview will load. When the user changes the value of picker, then Listview should be updated.I am not using any viewmodel.I have a helper class for API call and I am setting the json result to a list and Set it as itemsource for my listview. Somehow I achieved it

Use android package manager in Xamarin.Forms

安稳与你 提交于 2021-01-29 11:20:40
问题 Trying to check if a particular application is installed in the android phone or not. In android studio, I used Package manager to get the installation status of the application. But I need to use Xamarin.Forms for development. 回答1: yes,you could use DependencyService to achive this: first,define a Interface : public interface IsInstallApplication { bool IsInstall(string packageName); } then in Droid.project create a class which implement the interface : [assembly: Dependency(typeof

Saving and reading Picker values from SQLite - Xamarin.Forms

谁说我不能喝 提交于 2021-01-29 11:09:20
问题 I would like you to help me solve a problem that I can not deal with. In my Xamarin.Forms application, the user can add to the SQLite database: public class Car { [PrimaryKey, AutoIncrement] public int ID { get; set; } public string Text { get; set; } public int PickerValue { get; set; } } PickerValue is of type INT because I think that the selected value of the picker gives the index INT value. Am I wrong? The user adds item using: <Editor Placeholder="Enter name" Text="{Binding Text}" />

Lottie UWP support

笑着哭i 提交于 2021-01-29 11:04:55
问题 I was trying around with Lottie for Xamarin.Forms on iOS and UWP and now I am totally confused. Because my UWP App doesn't show the animations, i searched a little and found out, that UWP is not supported by Lottie. But because the Nuget is referencable from within my UWP App, I looked into the description of that Nuget and the Lottie Team wrote, that it is. So what is now correct? And if UWP IS supported, are there additional steps needed to do? 回答1: That appears to be a "typo" in the nuget

Xamarin IOS app crashes with exception: EXC_BAD_ACCESS (SIGABRT)

拜拜、爱过 提交于 2021-01-29 10:57:32
问题 As soon as I open my app in iPhone 8 , it suddenly crashes from today. It was working fine till yesterday night. This app is downloaded from app store which was published 3 weeks ago. Previously I used to have Corrupt database error and it kept crashing, but today the log says some SIGABRT exception. Here is the log file from Analytics data from the device: {"app_name":"TCRMobile.iOS","timestamp":"2018-09-13 10:29:23.02 -0700","app_version":"1.0.0","slice_uuid":"e52d1787-ffb2-3fb1-b09d

Data binding controls in C# code (.cs file)

自闭症网瘾萝莉.ら 提交于 2021-01-29 10:22:27
问题 i have been searching for data binding but instead of being in xaml i am searching for being in .cs file, is there a manner (property) that allows me to bind the specific property to a variable? I want to bind the "Text" property of the "Entry" control but the problem is that how do i do it? this is what i have tried, but i'm not sure about it beacuse OBVIOUSLY the code wasn't correct textBox.SetBinding(Entry.TextProperty, "MainViewModel.GetInstance().SubtasksList[TaskNumber - 1]"); code: var

Auto size ListView height when ListView item gets modified

亡梦爱人 提交于 2021-01-29 09:27:52
问题 I have been having some issues resizing my list view row to match the text inside of it. Also I have read a lot of documentation and everything seems to point toward using HasUnevenRows , which I am using but isn't quite what I need. I have a ListView which I allow the user to modify contents of this row using Rg.Popups and context actions. Essentially the user swipes and clicks Edit and they get pushed to a popup where they can edit the list view item. When the note gets updated it also gets

xamarin forms image not showing image in listview by URL sometimes

纵饮孤独 提交于 2021-01-29 09:17:58
问题 I'm using xamarin forms V3.4.0.1029999 I have a listview that it contains Image control. I Pass image source by an string Property. sometimes listview wont show image By URL. i mean for example it shows 39 items but 2. Sometimes it wont load image from URL. what should i do to always load image? 回答1: I would suggest you use FFImageLoading's CachedImage for this. It is a library that is vastly accepted by the community and is great with caching and has memory handling options as well. You can

Xamarin Forms: How to highlight text and pause/play audio of text to speech?

≡放荡痞女 提交于 2021-01-29 09:00:25
问题 I am using the xamarin essentials package for text to speech feature. When speech the text I need to highlight the corresponding text. Also, I need an option to pause/play the speech. Please see this video. Screenshot: How can I achieve highlight text feature and pause/play audio as the video? 回答1: highlight text feature You could splite the Text of Label . And use Span to set the highlight . in xaml <StackLayout x:Name="firstPage" VerticalOptions="CenterAndExpand" HorizontalOptions=