xamarin.forms

Superscript text in Label

对着背影说爱祢 提交于 2021-02-16 20:08:07
问题 Is it possible to superscript a label in Xamarin Forms? In HTML I would use the <sup> tag. I want to superscript the text "min". So I can have the text "5min" with the "min" part superscripted. 回答1: Thanks to Jason for his idea of using FormattedText property. But since it doesn't support binding of the text, I put 2 labels together in a StackLayout , the superscript text in mirco font size: <StackLayout Orientation="Horizontal" Spacing="0"> <Label Text="{Binding Minutes}"> <Label.FontFamily>

Background select item of List View

本秂侑毒 提交于 2021-02-16 15:37:13
问题 I have a page.xaml with a listview. The background color of the page is white and when I tap a ListView item, the background of this item is gray. How can I change this color (of the background selected item) in a cross-platform way? Page.xaml page.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; using Xamarin.Forms.Xaml; namespace App1.Materie_Universitarie.Diritto_Commerciale { [XamlCompilation

Why can we assign readonly IList collection with collection initializer?

≡放荡痞女 提交于 2021-02-15 07:48:08
问题 The readonly Children property of StackLayout is of type IList<View> . I got surprised knowing Children can be assigned with collection initializer as shown in the following code snippet (inspired by an example given by Xamarin.Forms documentation): public MainPage() { StackLayout sl = new StackLayout { Children = { new Label{Text="Start",HorizontalOptions=LayoutOptions.Start} } }; } Question Why can it be assigned while it is a readonly property? Next, I made a counter example as follows.

Native Admob Ads in Xamarin.Forms. Are there any ready-made solutions / examples?

你离开我真会死。 提交于 2021-02-15 07:11:17
问题 I need to implement Native Ads in Xamarin.Forms. But I did not find any examples on Xamarin.Forms. Maybe someone has an example of using Native Ads on Xamarin.Forms and can share. My example of what I was trying to do: Android: [assembly: Dependency(typeof(NativeAd))] namespace Ads.Droid.Platform.Renderers.Ad { public class NativeAd : AdListener, INativeAd { Context context = Android.App.Application.Context; NativeExpressAdView mAdView; public void Show() { var videoOptions = new VideoOptions

Native Admob Ads in Xamarin.Forms. Are there any ready-made solutions / examples?

拥有回忆 提交于 2021-02-15 07:08:49
问题 I need to implement Native Ads in Xamarin.Forms. But I did not find any examples on Xamarin.Forms. Maybe someone has an example of using Native Ads on Xamarin.Forms and can share. My example of what I was trying to do: Android: [assembly: Dependency(typeof(NativeAd))] namespace Ads.Droid.Platform.Renderers.Ad { public class NativeAd : AdListener, INativeAd { Context context = Android.App.Application.Context; NativeExpressAdView mAdView; public void Show() { var videoOptions = new VideoOptions

Native Admob Ads in Xamarin.Forms. Are there any ready-made solutions / examples?

梦想的初衷 提交于 2021-02-15 07:08:33
问题 I need to implement Native Ads in Xamarin.Forms. But I did not find any examples on Xamarin.Forms. Maybe someone has an example of using Native Ads on Xamarin.Forms and can share. My example of what I was trying to do: Android: [assembly: Dependency(typeof(NativeAd))] namespace Ads.Droid.Platform.Renderers.Ad { public class NativeAd : AdListener, INativeAd { Context context = Android.App.Application.Context; NativeExpressAdView mAdView; public void Show() { var videoOptions = new VideoOptions

UIWebView Deprecation and App Store Rejection on Xamarin Forms

北城以北 提交于 2021-02-15 05:17:56
问题 Can i fix the following ? My setup Xamarin.iOS Version: 13.16.0.13 (Visual Studio Community) Visual Studio Community 2019 for Mac Version 8.5.2 (build 13) Xamarin.Forms 4.5.0.617 I follow the instruction here https://docs.microsoft.com/en-gb/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and-app-store-rejection-itms-90809 and here https://github.com/xamarin/Xamarin.Forms/issues/7323#issuecomment-542363338 to fix this problem ITMS-90809: Deprecated API Usage -

UIWebView Deprecation and App Store Rejection on Xamarin Forms

自闭症网瘾萝莉.ら 提交于 2021-02-15 05:10:38
问题 Can i fix the following ? My setup Xamarin.iOS Version: 13.16.0.13 (Visual Studio Community) Visual Studio Community 2019 for Mac Version 8.5.2 (build 13) Xamarin.Forms 4.5.0.617 I follow the instruction here https://docs.microsoft.com/en-gb/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and-app-store-rejection-itms-90809 and here https://github.com/xamarin/Xamarin.Forms/issues/7323#issuecomment-542363338 to fix this problem ITMS-90809: Deprecated API Usage -

UIWebView Deprecation and App Store Rejection on Xamarin Forms

拈花ヽ惹草 提交于 2021-02-15 05:10:10
问题 Can i fix the following ? My setup Xamarin.iOS Version: 13.16.0.13 (Visual Studio Community) Visual Studio Community 2019 for Mac Version 8.5.2 (build 13) Xamarin.Forms 4.5.0.617 I follow the instruction here https://docs.microsoft.com/en-gb/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and-app-store-rejection-itms-90809 and here https://github.com/xamarin/Xamarin.Forms/issues/7323#issuecomment-542363338 to fix this problem ITMS-90809: Deprecated API Usage -

Xamarin Show Keyboard and Focus on an Entry Field

a 夏天 提交于 2021-02-13 17:34:03
问题 I am using Xamarin.Android and I have a Dialog with Xamarin.Forms.Entry field in it. How do I show keyboard and give focus to this Entry field when dialog is displayed? I am using a device, not an emulator. 回答1: Can you try this, dialog.Appearing += (object sender, System.EventArgs e) => yourEntry.Focus (); When you focus to the entry, Keyboard will be shown by default Here is the sample, i have tried to show keyboard in button click <StackLayout> <Entry x:Name="entry" HeightRequest="50"