xamarin.forms

Share width of a Grid-Column in a ViewCell?

青春壹個敷衍的年華 提交于 2021-02-07 20:25:54
问题 I would like to have my columns in my ListViews ViewCell to be all of the same size. It is currently set to auto and the widest name should win and all other columns should be set to the widest labels width. Currently they have all different widths in each row. ListView ItemTemplate Example: <ViewCell> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> / <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Label Grid.Row="0" Text="{Binding Name}"/> [....] In WPF we have

How to get the tab bar height in a Xamarin.Forms page

不想你离开。 提交于 2021-02-07 19:42:07
问题 I'm displaying an image within my content pages such that its height is a fixed percentage of the page height. I do this using a grid with star unit row height. However, when the content pages are placed within a TabbedPage, the total grid height seems to be that of [the screen minus the tab bar height], so as a consequence, the image appears a bit shorter. If I could access the tab bar height within my content pages, it would be a simple adjustment to the percentage. Question: 1) How do I

List.add() async task await correct syntax

两盒软妹~` 提交于 2021-02-07 18:38:43
问题 Hello I am trying to add items to a list asynchronously but I am not sure how it is done and if I am using an incorrect syntax, this is what I have at the moment: My View: await viewModel.getMessages(); list.ItemsSource = viewModel.Messages; My View Model: public List<Message> Messages { get; set; } public async Task getMessages() { await GetRemoteMessages(); } private async Task GetRemoteMessages() { var remoteClient = new ChiesiClient(); var messages = await remoteClient.getMessages()

Using Azure AD B2C in Xamarin.iOS with simulator - Problem with keychain (the Team ID is null)

和自甴很熟 提交于 2021-02-07 18:36:55
问题 I'm developing a Xamarin.Forms app, and setting up Azure AD B2C for auth. I'm following the official tutorial. Everything works flawlessly for Andorid, but I'm facing an issue with th iOS project. I've setup everything mentioned in the tutorial but that is not enough. In this post, it describes how you should configure the iOS Bundle Signing to reference as custom entitlement Entitlements.plist . Otherwise you get this error: Microsoft.Identity.Client.MsalClientException: The application

Using Azure AD B2C in Xamarin.iOS with simulator - Problem with keychain (the Team ID is null)

本秂侑毒 提交于 2021-02-07 18:36:29
问题 I'm developing a Xamarin.Forms app, and setting up Azure AD B2C for auth. I'm following the official tutorial. Everything works flawlessly for Andorid, but I'm facing an issue with th iOS project. I've setup everything mentioned in the tutorial but that is not enough. In this post, it describes how you should configure the iOS Bundle Signing to reference as custom entitlement Entitlements.plist . Otherwise you get this error: Microsoft.Identity.Client.MsalClientException: The application

Take or Select Multiple Image in Xamarin Forms

≯℡__Kan透↙ 提交于 2021-02-07 13:40:58
问题 I am using "Plugin.Media.CrossPlatform" nuget for accessing Camera and take pictures in Xamarin Forms. But currently, it takes only a single picture at a time and upload only that last taken picture. I want to add multiple captures and allow a user to select a specific picture from recently captured images. How's that possible with this plugin in Android and IOS both Platform? Also, I have added selection mode, If a user wants to select a picture from gallery. But there is the same issue. I

Take or Select Multiple Image in Xamarin Forms

假如想象 提交于 2021-02-07 13:39:43
问题 I am using "Plugin.Media.CrossPlatform" nuget for accessing Camera and take pictures in Xamarin Forms. But currently, it takes only a single picture at a time and upload only that last taken picture. I want to add multiple captures and allow a user to select a specific picture from recently captured images. How's that possible with this plugin in Android and IOS both Platform? Also, I have added selection mode, If a user wants to select a picture from gallery. But there is the same issue. I

Xamarin.UITesting NU1201 Error: Android 8.1 Is incompatible with .NETFramework 4.6.1

北城余情 提交于 2021-02-07 12:56:47
问题 Have been having a little issue for the last couple of days now where I will create a new Xamarin Forms project on Visual Studio 2017 and add a Xamarin.UITest Cross-Platform Test Project for unit testing I recieve a series of NU1201 Errors when I reference the .Android App in the UITest Project. Here is the exact error i get: Error NU1201 Project App1.Android is not compatible with net461 (.NETFramework,Version=v4.6.1) / win-x64. Project App1.Android supports: monoandroid81 (MonoAndroid

xamarin.forms add switch in toolbar

不问归期 提交于 2021-02-07 10:19:05
问题 Is it possible to add a switch on the toolbar? <ContentPage.ToolbarItems> <ToolbarItem> <Switch x:Name="Switch1" IsToggled="True" Margin="5,0,0,0"/> </ToolbarItem> </ContentPage.ToolbarItems> Does anybody have any ideas? Thanks! 回答1: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:TitleViewSample" x:Class="TitleViewSample.MainPage"> <NavigationPage.TitleView> <Switch x:Name="Switch1" IsToggled="True"

xamarin.forms add switch in toolbar

北战南征 提交于 2021-02-07 10:17:28
问题 Is it possible to add a switch on the toolbar? <ContentPage.ToolbarItems> <ToolbarItem> <Switch x:Name="Switch1" IsToggled="True" Margin="5,0,0,0"/> </ToolbarItem> </ContentPage.ToolbarItems> Does anybody have any ideas? Thanks! 回答1: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:TitleViewSample" x:Class="TitleViewSample.MainPage"> <NavigationPage.TitleView> <Switch x:Name="Switch1" IsToggled="True"