[Solved] when to use await key word? do I need it in this case?

no you don’t need to do that, you can use .Result if you don’t want to execute your code asynchronously , this code is perfectly fine : private void Button_Clicked(object sender, EventArgs e) { try { var getTokenQ = SecureStorage.GetAsync(“Save_Security_Question”).Result; if ((String.IsNullOrWhiteSpace(getTokenQ) == false)) { } else { } } catch (Exception ex) { DisplayAlert(“Message”, … Read more

[Solved] hierarchy structure xamarin form

I would suggest you use a Grid to achive the layout on the image. here is an example how to use a Grid to achive the desired hierarchy: <Grid> <Grid.RowDefinitions> <RowDefinition Height=”Auto” /> <RowDefinition Height=”Auto” /> <RowDefinition Height=”Auto” /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width=”*” /> <ColumnDefinition Width=”*” /> <ColumnDefinition Width=”*” /> <ColumnDefinition Width=”*” /> </Grid.ColumnDefinitions> //TOP … Read more

[Solved] What is the used for in Xamarin Forms and can it be replaced with a value setting?

Using the new syntax, that would translate to: <Grid ColumnDefinitions=”*, 50″> For the complete specs on the new syntax, you can read this: https://github.com/microsoft/microsoft-ui-xaml/issues/673 Basically, <ColumnDefinition /> is the equivalent of <ColumnDefinition Width=”*” /> (* is the default value for the Width property). The width of a column can be expressed in 3 ways: Auto … Read more

[Solved] How to open PDF file in xamarin forms

how could I save it on download folder? For android, you can save pdf file in download folder by following path. string rootPath = Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, Android.OS.Environment.DirectoryDownloads); For ios, use this directory to store user documents and application data files. var documents = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments); About open pdf in Anaroid, you can use the following code: … Read more

[Solved] Trying to change a Label from two enteries when Button pressed and display on another page? | Xamarin | C# [closed]

If you mean enter text in two labels is the enter text in two entrys . Here is a sample for reference : PageA – Xaml : <Entry x:Name=”entryone”/> <Entry x:Name=”entrytwo”/> <Button Text=”Push” Clicked=”Button_Clicked”/> ContentPage – Button_Clicked : private void Button_Clicked(object sender, EventArgs e) { SecondPage secondPage = new SecondPage(); secondPage.previousPageValue = entryone.Text + entrytwo.Text; … Read more

[Solved] How set auto day/night mode google maps in Xamarin Forms

Install the Xamarin.Forms.GoogleMaps Nuget Package (source code available on GitHub) which has already implemented it on Xamarin.Forms. You can refer to the MapStylePage sample available here which basically explains you how to create original map styles using MapStyle With Google. You can use the wizard, select the Night theme from there and get the corresponding … Read more

[Solved] Tabbed page custom renderer on Xamarin.Forms [closed]

When you want to change the font of tab page, you could use the custom renderer to reset it. MyTabbedPageRenderer.cs: [assembly: ExportRenderer(typeof(MainPage), typeof(MyTabbedPageRenderer))] namespace TabbedPageDemo.Droid { class MyTabbedPageRenderer : TabbedPageRenderer { public MyTabbedPageRenderer(Context context) : base(context) { } protected override void OnElementChanged(ElementChangedEventArgs<TabbedPage> e) { base.OnElementChanged(e); if (e.NewElement == null || e.OldElement != null) return; TabLayout … Read more

[Solved] How can I install a github plugin into my xamarin forms solution? (VS Mac 2017)

Example using Connectivity Plugin by James Montemagno Github Plugin : ConnectivityPlugin Open your Project and right click on Packages and select add package If you are using .NET 2 you can do it this way Search for Xam.Plugin.Connectivity I found the name here (plugins normally have a link on their github branch) Nuget : Xam.Plugin.Connectivity … Read more