xamarin.forms

Xamarin Forms content page make background color transparent

半世苍凉 提交于 2020-05-16 02:28:07
问题 I have a requirement where in I need to display a list in a modal popup page.I am able to display a list but I cant make the background color transparent or semi transparent so that the page under it is partially visible. I am pushing the page from my View Model using the folowing: NavigationParameters oNavParams = new NavigationParameters(); oNavParams.Add("Mode", "FeedBack"); oNavParams.Add("selectedItem", txtFeedback); _navigationService.NavigateAsync("PopupBox", oNavParams); Here is my

Error:Xamarin.Forms targets have been imported multiple times

坚强是说给别人听的谎言 提交于 2020-05-15 19:44:46
问题 a few hours ago, my solution just builds success, but after that it has error "Xamarin.Forms targets have been imported multiple times." I have struggled with that a whole week. my project here: file my project I didn't see any multiple xamarin.forms at all. 回答1: This solution might help, we encountered same issue in recent past. Remove and add packages back will help you. Steps: Keep back up of your packages.config file. Remove all packages from packages.config file. Close project and open

Error:Xamarin.Forms targets have been imported multiple times

自闭症网瘾萝莉.ら 提交于 2020-05-15 19:44:10
问题 a few hours ago, my solution just builds success, but after that it has error "Xamarin.Forms targets have been imported multiple times." I have struggled with that a whole week. my project here: file my project I didn't see any multiple xamarin.forms at all. 回答1: This solution might help, we encountered same issue in recent past. Remove and add packages back will help you. Steps: Keep back up of your packages.config file. Remove all packages from packages.config file. Close project and open

Bad notification for startForeground in Android app

六眼飞鱼酱① 提交于 2020-05-15 06:48:06
问题 I am developing a service using Xamarin Android 3.5. Our app targets Android 8.1 (API 27 - Oreo). I want the service to run as a foreground service. However I am getting the following error when I run the service. Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x42 color=0x00000000 vis=PRIVATE) Here is the code for the service. public

How move the scroll only when there are the keyboard

亡梦爱人 提交于 2020-05-15 05:48:46
问题 I used this function to move my scroll, but this function is activated when I don't have a keyboard, I only want to use it when there is a keyboard, how can I solve this? <Entry Placeholder="entry" Focused="EntryKeyboardHandle_Focused" void EntryKeyboardHandle_Focused(object sender, FocusEventArgs e) { Device.BeginInvokeOnMainThread(async () => { await Task.Delay(10); await MainScroll.ScrollToAsync(0, 100, true); }); } I found this thread Xamarin forms check if keyboard is open or not I have

Xamarin.Forms Navigation.PushAsync Not Working

ぃ、小莉子 提交于 2020-05-15 04:38:07
问题 I have a Xamarin.Forms project, and I have a custom control that should open a new page when tapped. Unfortunately, nothing happens when I call Navigation.PushAsync(...); . I've read countless StackOverflow questions (such as this one) and Xamarin Forums threads and done several Google searches, but none of the solutions seem to solve my issue. My control inherits from ContentView , as all Xamarin.Forms views do. src is a custom class that contains some data points that are used by this

WebUI Deprecated mail even after the following the steps mentioned in Xamarin forum

╄→尐↘猪︶ㄣ 提交于 2020-05-14 12:50:05
问题 Recently we have been receiving the UIWebView deprecated warnings from Appstore, for which xamarin forms has directed the developers to do the below four things Update Xamarin.Forms to 4.5 or higher – Pre-release versions of Xamarin.Forms 4.5 can be used. Use Xamarin.iOS 13.10.0.17 or higher – Check your Xamarin.iOS version in Visual Studio. This version of Xamarin.iOS is included with Visual Studio for Mac 8.4.1 and Visual Studio 16.4.3. Remove references to UIWebView – Your code should not

Is it possible to wait for Device.BeginInvokeOnMainThread code to finish (continue background work with results of a UI call)

∥☆過路亽.° 提交于 2020-05-14 04:06:07
问题 In my code I have a task called "ShowMessageBoxAsync". I want to use this code to show (and await) the DisplayAlert to the user and return the result. Like this: var messageBoxResult = await View.ShowMessageBoxAsync("This is an error"); The code for the ShowMessageBoxAsync is: public async System.Threading.Tasks.Task<bool> ShowMessageBoxAsync(string message) { var result = false; Device.BeginInvokeOnMainThread(async () => { result = await DisplayAlert("Error", message, "OK", "Cancel"); });

Is it possible to wait for Device.BeginInvokeOnMainThread code to finish (continue background work with results of a UI call)

时光怂恿深爱的人放手 提交于 2020-05-14 04:02:23
问题 In my code I have a task called "ShowMessageBoxAsync". I want to use this code to show (and await) the DisplayAlert to the user and return the result. Like this: var messageBoxResult = await View.ShowMessageBoxAsync("This is an error"); The code for the ShowMessageBoxAsync is: public async System.Threading.Tasks.Task<bool> ShowMessageBoxAsync(string message) { var result = false; Device.BeginInvokeOnMainThread(async () => { result = await DisplayAlert("Error", message, "OK", "Cancel"); });

How to remove top bar from Xamarin.Forms (iOS)?

佐手、 提交于 2020-05-14 03:54:33
问题 How can I remove the top bar from iOS project of Xamarin.Forms? Where the time and "Carrier" word are .. or at least measure its height? Just to be sure.. I don't want to see battery, time... I want to hide the bar in the red rectangle: 回答1: You can add this code on your AppDelegate.cs inside FinishedLaunching method after LoadApplication (new App ()); on iOS Project: UIApplication.SharedApplication.StatusBarHidden = true; also add this on your info.plist : <key