xamarin.forms

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

岁酱吖の 提交于 2020-05-14 03:54:10
问题 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

Disable system font size effect in my App. - C# - Xamarin.Forms Android

一个人想着一个人 提交于 2020-05-14 01:22:29
问题 I dont want to that system font size have any effect in my app. If i increase system font size in android settings, the text in my app will be unreadable. (Too big.) How can i solve it? PS: Im writing my code in C#, Xamarin.Forms project. Thanks 回答1: Disable system font size effect in my App If you need set a fixed text size for your application, you try using the following code to implement this feature: private void initFontScale() { Configuration configuration = Resources.Configuration;

Set default tab on Xamarin Forms Shell

六眼飞鱼酱① 提交于 2020-05-13 13:42:55
问题 How to set the default selected Tab inside the tab bar on Xamarin forms shell? <?xml version="1.0" encoding="UTF-8"?> <Shell xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TestApp.NavigationShell" xmlns:pages="clr-namespace:TestApp.Pages" xmlns:pageModels="clr-namespace:TestApp.PageModels"> <TabBar Route="testapp"> <Tab Title="Saved" Icon="tabDashboard" Route="dashboard"><ShellContent ContentTemplate="{DataTemplate pages

Set default tab on Xamarin Forms Shell

Deadly 提交于 2020-05-13 13:42:15
问题 How to set the default selected Tab inside the tab bar on Xamarin forms shell? <?xml version="1.0" encoding="UTF-8"?> <Shell xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TestApp.NavigationShell" xmlns:pages="clr-namespace:TestApp.Pages" xmlns:pageModels="clr-namespace:TestApp.PageModels"> <TabBar Route="testapp"> <Tab Title="Saved" Icon="tabDashboard" Route="dashboard"><ShellContent ContentTemplate="{DataTemplate pages

Xamarin forms check if keyboard is open or not

自作多情 提交于 2020-05-11 07:33:27
问题 Is there any way to check if keyboard is open or not in Xamarin Forms? Are there any events getting fired when the keyboard opens or closes? If so, where can I find an example of it? 回答1: I don't believe that there's a Xamarin.Forms way of doing it. Anyway, for the different platforms (at least Android and iOS) there is a way to achieve what you want. Android Under android there is InputMethodManager class. You can obtain it from your activity var inputMethodManager = (InputMethodManager)this

Xamarin forms check if keyboard is open or not

元气小坏坏 提交于 2020-05-11 07:33:07
问题 Is there any way to check if keyboard is open or not in Xamarin Forms? Are there any events getting fired when the keyboard opens or closes? If so, where can I find an example of it? 回答1: I don't believe that there's a Xamarin.Forms way of doing it. Anyway, for the different platforms (at least Android and iOS) there is a way to achieve what you want. Android Under android there is InputMethodManager class. You can obtain it from your activity var inputMethodManager = (InputMethodManager)this

How to download image and save it in local storage using Xamarin-Forms.?

空扰寡人 提交于 2020-05-11 06:46:30
问题 I want to download an image and store it in specific folder in local storage. I am using this to download image: var imageData = await AzureStorage.GetFileAsync(ContainerType.Image, uploadedFilename); var img = ImageSource.FromStream(() => new MemoryStream(imageData)); 回答1: Create a FileService interface in your Shared Code, create a new Interface, for instance, called IFileService.cs public interface IFileService { void SavePicture(string name, Stream data, string location="temp"); }

Problem with calling 4 async method paralel in constructor [closed]

霸气de小男生 提交于 2020-05-09 17:29:08
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last month . I have a problem with tasks in c#, and don't know how to use async await . I have 4 methods, something like: private async Task Name(parameters) {} How can I run all 4 methods simultaneously in the constructor, to reduce the execution time and optimize cpu usage. I tried Parallel.Invoke(() => but

Problem with calling 4 async method paralel in constructor [closed]

冷暖自知 提交于 2020-05-09 17:29:07
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last month . I have a problem with tasks in c#, and don't know how to use async await . I have 4 methods, something like: private async Task Name(parameters) {} How can I run all 4 methods simultaneously in the constructor, to reduce the execution time and optimize cpu usage. I tried Parallel.Invoke(() => but

Xamarin Forms - Get custom control runtime (with valueconverter?)

旧时模样 提交于 2020-05-09 17:21:26
问题 I have a Xamarin forms application. It has a page. That page has a listview. The listviews is bind to a sourcelist. What I want is to decide what custom control to use based on a specific property that each item in the list has. How can I achieve this? It is also required that the custom control binds to values from the list. I tried the following: <ContentView Content="{Binding IsPriority, Converter={StaticResource RoadIndicatorBackgroundValueConverter}}" ControlText="{Binding TowingOrder