xamarin.forms

When using the new ColumnDefinition syntax, how can I represent <ColumnDefinition />

南楼画角 提交于 2021-01-05 09:11:17
问题 I have this code: <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="50" /> </Grid.ColumnDefinitions> Can someone tell me how I can represent this using the new shortcut? <Grid ColumnDefinitions=" ,50"> In particular I am not sure what to put for the first ColumnDefinition which in my code is currently just a space before the slash. Related: Proposal: Simplify Grid Column and Row Definitions #673 回答1: As noted on the Grid Docs page the default value for Width (or Height in

Fail to connect to camera service in Xamarin

拈花ヽ惹草 提交于 2021-01-05 07:29:48
问题 In my Xamarin app, there is a Custom Camera Renderer. It had issue, which @Jai had resolved. It solved all the problems, but I wasn't able to use the Front Camera, could only use Rear Camera. He suggested to use Control.Preview = Camera.Open((int)e.NewElement.Camera); instead of Control.Preview = Camera.Open(); As there are multiple pages, the first two pages has Rear Camera enable, and on the last, Front Camera . When I choose to Redo (take all the 3 Pictures, and then start again from first

Fail to connect to camera service in Xamarin

狂风中的少年 提交于 2021-01-05 07:29:46
问题 In my Xamarin app, there is a Custom Camera Renderer. It had issue, which @Jai had resolved. It solved all the problems, but I wasn't able to use the Front Camera, could only use Rear Camera. He suggested to use Control.Preview = Camera.Open((int)e.NewElement.Camera); instead of Control.Preview = Camera.Open(); As there are multiple pages, the first two pages has Rear Camera enable, and on the last, Front Camera . When I choose to Redo (take all the 3 Pictures, and then start again from first

Fail to connect to camera service in Xamarin

强颜欢笑 提交于 2021-01-05 07:29:22
问题 In my Xamarin app, there is a Custom Camera Renderer. It had issue, which @Jai had resolved. It solved all the problems, but I wasn't able to use the Front Camera, could only use Rear Camera. He suggested to use Control.Preview = Camera.Open((int)e.NewElement.Camera); instead of Control.Preview = Camera.Open(); As there are multiple pages, the first two pages has Rear Camera enable, and on the last, Front Camera . When I choose to Redo (take all the 3 Pictures, and then start again from first

How to get MediaFile object from a Audio File path?

情到浓时终转凉″ 提交于 2021-01-05 07:07:36
问题 I have used Xamarin.Android Recorder to record a audio and i am getting recorded audio file path. Now i need to upload that audio file to Server using this. Please help me to create MediaFile object for a recorded audio file in Xamarin.Forms. Xamarin.Android solution will also work as i will create Dependency service to use it. 来源: https://stackoverflow.com/questions/65306057/how-to-get-mediafile-object-from-a-audio-file-path

Bug? System.ArgumentException: 'unable to figure out route for:

China☆狼群 提交于 2021-01-05 04:50:56
问题 Error System.ArgumentException: 'unable to figure out route for: //RegisterPage Parameter name: uri' System.ArgumentException: 'unable to figure out route for: //LogoPage Parameter name: uri' What is wrong? It cant figure out the route...? XAML <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org

Bug? System.ArgumentException: 'unable to figure out route for:

你说的曾经没有我的故事 提交于 2021-01-05 04:48:09
问题 Error System.ArgumentException: 'unable to figure out route for: //RegisterPage Parameter name: uri' System.ArgumentException: 'unable to figure out route for: //LogoPage Parameter name: uri' What is wrong? It cant figure out the route...? XAML <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org

Bug? System.ArgumentException: 'unable to figure out route for:

自闭症网瘾萝莉.ら 提交于 2021-01-05 04:45:41
问题 Error System.ArgumentException: 'unable to figure out route for: //RegisterPage Parameter name: uri' System.ArgumentException: 'unable to figure out route for: //LogoPage Parameter name: uri' What is wrong? It cant figure out the route...? XAML <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org

How to set background image to a shape

梦想与她 提交于 2021-01-02 20:23:51
问题 I am new to Xamarin Forms, I am from WPF background. In WPF it's easy to set background image(remote) to a shape. Is there any equivalent thing in Xamarin Forms? 回答1: After Shapes and Paths were introduced to Xamarin.Forms you can achieve it inside a Grid: <Grid HorizontalOptions="Center" VerticalOptions="Center"> <Ellipse Stroke="blue" StrokeThickness="5" Fill="Black" Aspect="Fill"/> <Image Source="xamarin.png" WidthRequest="300" HeightRequest="300"/> </Grid> Rounded corners with Frame :

How to override/modify the Content property of Frame to accept multiple Views in Xamarin.Forms?

房东的猫 提交于 2021-01-02 05:17:35
问题 Here's the C# template code I have: public class PopupFrame : Frame { public PopupFrame() { this.SetDynamicResource(BackgroundColorProperty, "PopUpBackgroundColor"); this.SetDynamicResource(CornerRadiusProperty, "PopupCornerRadius"); HasShadow = true; HorizontalOptions = LayoutOptions.FillAndExpand; Padding = 0; VerticalOptions = LayoutOptions.Center; } } I am using it like this: <t:PopupFrame> <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> <t:PopupHeader Text