xamarin.forms-styles

Button text always showing in uppercase

旧时模样 提交于 2020-12-30 04:54:40
问题 In my xamarin forms project button text are always show in uppercase format. But I am providing upper and lower case letters in xaml. When I build the solution all the letters are changed to uppercase. 回答1: I'm guessing you see this on Android as it is the default for button text and has been since Lollipop. To change this behavior add the following to your styles.xml file which can be found in the Android project under the Resources then values folders <item name="android:textAllCaps">false<

Button text always showing in uppercase

*爱你&永不变心* 提交于 2020-12-30 04:54:02
问题 In my xamarin forms project button text are always show in uppercase format. But I am providing upper and lower case letters in xaml. When I build the solution all the letters are changed to uppercase. 回答1: I'm guessing you see this on Android as it is the default for button text and has been since Lollipop. To change this behavior add the following to your styles.xml file which can be found in the Android project under the Resources then values folders <item name="android:textAllCaps">false<

Xamarin.Forms - Switching between Dark & Light themes at run time

牧云@^-^@ 提交于 2020-01-13 10:48:29
问题 1 - Any idea if we can switch between Light & Dark themes using the Xamarin.Forms themes introduced in version 2.3.x (link below). Any workaround? https://developer.xamarin.com/guides/xamarin-forms/user-interface/themes/ 2 - Also I see this release is in preview ever since it was introduced. Are there any issues and we cannot use it in production? 回答1: The accepted answer doesn't adhere to the convention demonstrated by Microsoft. Assuming you've installed the packages, Xamarin.Forms.Themes

Xamarin Forms Styles - Support multiple target types

泪湿孤枕 提交于 2019-12-11 16:32:04
问题 I have recently updated to very latest Xamarin forms pre release 4.2 version. One notable breaking change I have encounter is - Say I have the following Style: <Style x:Key="LightTextLabelStyle" TargetType="Label"> <Setter Property="FontFamily" Value="{StaticResource TextLight}" /> <Setter Property="FontSize" Value="15" /> <Setter Property="TextColor" Value="{StaticResource greyishBrown}" /> </Style> In previous versions, same target "Label" was supported for both Span and Labels. Like - this

How to change the keyboard layout of a UWP app in Xamarin Forms?

浪尽此生 提交于 2019-12-11 04:49:33
问题 I am working on a Xamarin Forms app which I want to deploy on Windows (UWP). The current problem I am trying to solve is to set the keyboard layout on an "Entry". According to the docs the only change I have to make is to add a "keyboard" property in the Entry xaml code like that: <Entry Keyboard="Numeric" /> That does work fine in Windows Mobile Emulator and the keyboard does change as soon as I click on the entry. However, when I run the project on a Surface Pro tablet (UWP) the layout of

How to change Picker font colour and size in Xamarin forms?

末鹿安然 提交于 2019-12-10 10:57:27
问题 I'm new to Xamarin and I'm currently doing a project in Xamarin Forms PCL. Is there a way to change the font colour and size of Picker? <Picker x:Name="pkr_color" Grid.Row="4" Grid.Column="1" HorizontalOptions="FillAndExpand" BackgroundColor="#ededed" Title="Select Color"> <Picker.Items> <x:String>Red</x:String> <x:String>Blue</x:String> <x:String>Green</x:String> </Picker.Items> </Picker> Thanks in advance! 回答1: You will need to write a custom renderer for each platform. using System; using

Xamarin.Forms - Switching between Dark & Light themes at run time

五迷三道 提交于 2019-12-05 10:45:18
1 - Any idea if we can switch between Light & Dark themes using the Xamarin.Forms themes introduced in version 2.3.x (link below). Any workaround? https://developer.xamarin.com/guides/xamarin-forms/user-interface/themes/ 2 - Also I see this release is in preview ever since it was introduced. Are there any issues and we cannot use it in production? The accepted answer doesn't adhere to the convention demonstrated by Microsoft . Assuming you've installed the packages, Xamarin.Forms.Themes.Base , Xamarin.Forms.Themes.Light , and Xamarin.Forms.Themes.Dark , and your App.xaml looks like, <?xml