xamarin.forms

Local Push notification not working in Xamarin iOS

大憨熊 提交于 2020-07-10 11:10:50
问题 I am using Xamarin.forms and implemented Local push notification for iOS. It is working successfully when I am debugging the app through visual studio even when the app is minimized, the app can able to receive the notification. But while running the app directly without debugging through visual studio, the app is not able to display the notification. Kindly guide me on this. Then I also tried by releasing the app to the app store but experienced the same, the app is not able to receive the

How to add/ load/ delete items from a foreign key table in xamarin forms with sqlite-net-pcl and sqliteExtensions

醉酒当歌 提交于 2020-07-10 10:26:30
问题 Hi i have this two tables ( not sure if they are written correctly) an agenda can contain many Tasks, my question is how do i write the methods to add/delete/load my tasks in my agenda, i am not sure how this work when you have a foreign key ? Thank you. Agenda.cs in the Models folder [Table("Agenda")] public class Agenda { [PrimaryKey, AutoIncrement] public int ID { get; set; } public string Topic { get; set; } public string Duration { get; set; } public DateTime Date { get; set; }

FontFamily on Shell -> TabBar -> Tab -> Title

寵の児 提交于 2020-07-10 08:38:11
问题 Is there a way to set this a font family? I'm unable to find how to do it. In what way I can implement this? 回答1: as i didn't find the direct property to set,here i use Custom Renderen to achive it (for Android): create a AndroidShell.cs in Droid project: [assembly: ExportRenderer(typeof(ShellTest.AppShell), typeof(AndroidShell))] namespace ShellTest.Droid { class AndroidShell : ShellRenderer { public AndroidShell(Context context) : base(context) { } protected override

Xamarin Forms: Load a Detail page consuming REST API OnItemSelected of listview

大兔子大兔子 提交于 2020-07-10 07:06:47
问题 I have listview. when the item is clicked, it will open a detail page to show detail information of selected item by taking selected item as a input parameter. To fetch the detail information I need to a REST api call. Once the response is received from api, I need to bind that information on the detail view/page. listview.xaml.cs: async void OnItemSelected(object sender, EventArgs args) { var layout = (BindableObject)sender; var item = (Target)layout.BindingContext; // Passing to be used as

Xamarin Forms: Set Background Color of Item Selected in ListView from ViewModel

狂风中的少年 提交于 2020-07-09 19:33:11
问题 I am trying to change the background color of a selected item in a list view when the selection is done in code from the ViewModel. I have found a number of posts associated to changing the background color when the item is selected by user action (i.e., Tapped) Xamarin.Forms ListView: Set the highlight color of a tapped item This solution - Using Item Taped works for when the user taps the item in the list but there are cases when an item in the ListView is selected by the user entering data

Is there a library to resize an image

杀马特。学长 韩版系。学妹 提交于 2020-07-09 13:09:29
问题 I am currently using FFImageLoading package to do caching etc to show on the ui. I am unsure whether FFImageLoading have function to resize the image itself so i can save it and send over the internet. 回答1: It's as easy as: var stream = await ImageService.Instance.LoadFile("someimage.png") .DownSample(width: 200) .AsPNGStreamAsync(); 来源: https://stackoverflow.com/questions/41625118/is-there-a-library-to-resize-an-image

Is there a library to resize an image

走远了吗. 提交于 2020-07-09 13:07:24
问题 I am currently using FFImageLoading package to do caching etc to show on the ui. I am unsure whether FFImageLoading have function to resize the image itself so i can save it and send over the internet. 回答1: It's as easy as: var stream = await ImageService.Instance.LoadFile("someimage.png") .DownSample(width: 200) .AsPNGStreamAsync(); 来源: https://stackoverflow.com/questions/41625118/is-there-a-library-to-resize-an-image

Xamarin Forms - Image To/From IRandomAccessStreamReference

纵然是瞬间 提交于 2020-07-09 09:23:45
问题 For personal needs, for the Xamarin.Forms.Map control, I need to create a CustomPin extension. UWP part (PCL project) I create a MapIcon like it: nativeMap.MapElements.Add(new MapIcon() { Title = pin.Name, Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/Pin/customicon.png")), Location = new Geopoint(new BasicGeoposition() { Latitude = pin.Position.Latitude, Longitude = pin.Position.Longitude }), NormalizedAnchorPoint = new Windows.Foundation.Point(0.5, 1.0) });

Xamarin Forms - Image To/From IRandomAccessStreamReference

断了今生、忘了曾经 提交于 2020-07-09 09:21:23
问题 For personal needs, for the Xamarin.Forms.Map control, I need to create a CustomPin extension. UWP part (PCL project) I create a MapIcon like it: nativeMap.MapElements.Add(new MapIcon() { Title = pin.Name, Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/Pin/customicon.png")), Location = new Geopoint(new BasicGeoposition() { Latitude = pin.Position.Latitude, Longitude = pin.Position.Longitude }), NormalizedAnchorPoint = new Windows.Foundation.Point(0.5, 1.0) });

Show Acr User Dialogs loader until end of method xamarin forms (android)

南楼画角 提交于 2020-07-08 09:40:33
问题 I use ShowLoading() Acr UserDialogs (v5.2.2) on my xamarin forms project (android and ios) but i wont start loader before start await method and Hide Loader with the end. My code working on ios but on android nothing happened. example async Task MyMethod() { UserDialogs.Instance.ShowLoading("Loading",MaskType.Black); await ViewModel.LoadData(); UserDialogs.Instance.HideLoading(); } //InsideViewModel public async Task LoadData(); { await Task.Yield(); //without this code and ios doesnt work /